Yeni pencerede işlem kodu açma II
ABAP4_CALL_TRANSACTION fonksiyonunun kullanımı :
* Batchinputdata of single transaction
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
* messages of call transaction
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
form f_CALL_QE01 using PRM_Qplos TYPE QPLOS.
data : LV_parameter TYPE string.
PERFORM CALL_TCODE USING `QE01` LV_parameter PRM_Qplos .
ENDFORM.
form f_CALL_QE03 using PRM_Qplos TYPE QPLOS..
data : LV_parameter TYPE string.
set parameter id `QLS` field PRM_Qplos .
PERFORM CALL_TCODE USING `QE03` LV_parameter PRM_Qplos .
ENDFORM.
FORM CALL_TCODE USING PRM_TCODE TYPE SYTCODE
pRM_S TYPE string
PRM_Qplos TYPE QPLOS.
PERFORM F_Fill_Batch using PRM_TCODE
PRM_Qplos .
CALL FUNCTION `ABAP4_CALL_TRANSACTION` STARTING NEW TASK `TEST`
DESTINATION `NONE`
EXPORTING
TCODE = PRM_TCODE
TABLES
USING_TAB = BDCDATA[]
EXCEPTIONS
COMMUNICATION_FAILURE = 1 "MESSAGE MSG_TEXT
SYSTEM_FAILURE = 2 ."MESSAGE MSG_TEXT.
ENDFORM.
*----------------------------------------------------------------------*
* Start new screen *
*----------------------------------------------------------------------*
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = `X`.
APPEND BDCDATA.
ENDFORM.
*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM.
FORM F_Fill_Batch using PRM_TCODE TYPE SYTCODE
PRM_Qplos TYPE QPLOS.
REFRESH BDCDATA.
perform bdc_dynpro using `SAPMQEEA` `0100`.
perform bdc_field using `BDC_CURSOR`
`QALS-PRUEFLOS`.
perform bdc_field using `QALS-PRUEFLOS`
PRM_Qplos.
ENDFORM.
* T QE01
*SAPMQEEA 0100 X
* BDC_OKCODE /EC00
* BDC_CURSOR QALS-PRUEFLOS