20 августа 2010 г.

ABAP: Шаблоны для BDC CALL TRANSACTION

* tables
  DATA: bdc_tab TYPE TABLE OF bdcdata. 

* structures
  DATA: bdc_line TYPE bdcdata.

  DEFINE bdc_dynpro.
    CLEAR bdc_line.
    bdc_line-PROGRAM = &1.
    bdc_line-DYNPRO  = &2.
    bdc_line-DYNBEGIN = 'X'.
    APPEND bdc_line TO bdc_tab.
  END-OF-DEFINITION.

  DEFINE bdc_field.
    CLEAR bdc_line.
    bdc_line-FNAM = &1.
    bdc_line-FVAL = &2.
    APPEND bdc_line TO bdc_tab.
  END-OF-DEFINITION.
  
  ...
 
  CALL TRANSACTION lv_tcod USING bdc_tab MODE '%MODE%' UPDATE '%UPDATE%'.

* %MODE%
* "A" Processing with display of screens 
* "E" Display of screens only if an error occurs 
* "N" Processing without display of screens. If a breakpoint is reached in one of the called transactions, processing is terminated with sy-subrc same as 1001. The field sy-msgty contains "S", sy-msgid contains "00", sy-msgno contains "344", sy-msgv1 contains "SAPMSSY3", and sy-msgv2 contains "0131". 
* "P" Processing without display of the screens. If a breakpoint is reached in one of the called transactions, the system branches to the ABAP Debugger. 
* Others Like "A". 
* %UPDATE%
* "A" Asynchronous update. Updates of called programs are executed in the same way as if in the COMMIT WORK statement the AND WAIT addition was not specified. 
* "S" Synchronous processing. Updates of the called programs are executed in the same way as if in the COMMIT WORK statement the AND WAIT addition had been specified. 
* "L" Local update. Updates of the called program are executed in such a way as if the SET UPDATE TASK LOCAL statement had been executed in it. 
* Other As for "A". 

Комментариев нет:

Отправить комментарий