02/08/2010

Processing of more than one transaction in a single step.


*----------------------------------------------------------------------
* Processing of more than one transaction in a single step.
*----------------------------------------------------------------------
REPORT ztest NO STANDARD PAGE HEADING LINE-SIZE 255.

DATA: BEGIN OF bdc_tab OCCURS 10.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.


CLEAR bdc_tab.
REFRESH bdc_tab.

PERFORM dynpro_screen USING 'SAPLCOKO1' '0110'.
PERFORM dynpro_field USING 'CAUFVD-AUFNR' '000501210974'.
PERFORM dynpro_field USING 'R62CLORD-FLG_KNOT' 'X'.
PERFORM dynpro_field USING 'BDC_OKCODE' '/00'.

PERFORM dynpro_screen USING 'SAPLCOKO1' '0115'.
PERFORM dynpro_field USING 'BDC_OKCODE' 'KOAZ'.

CALL TRANSACTION 'CO03' USING bdc_tab MODE 'E' UPDATE 'S'.


*----------------------------------------------------------------------
* Processing of Dynpros
*----------------------------------------------------------------------
FORM dynpro_screen USING dyn_name dyn_nr.

CLEAR bdc_tab.
bdc_tab-program = dyn_name.
bdc_tab-dynpro = dyn_nr.
bdc_tab-dynbegin = 'X'.
APPEND bdc_tab.

ENDFORM.


*----------------------------------------------------------------------
* Processing of fields
*----------------------------------------------------------------------
FORM dynpro_field USING feldname feldinhalt.

CLEAR bdc_tab.
bdc_tab-fnam = feldname.
bdc_tab-fval = feldinhalt.
APPEND bdc_tab.

ENDFORM.

Nenhum comentário:

Postar um comentário