Tuesday, April 15, 2014

ABAP 7.40 - VALUE - Value Operator

Calling a Transaction using BDC as an example for ABAP's new VALUE operator 

data(lt_bdc) = value bdcdata_tab(
  ( program = '...' dynpro = '1000' dynbeg = 'X' )
  ( fnam = 'BDC_CURSOR'  fval= 'S_MATNR-LOW' )
  ( fnam = 'S_MATNR-LOW' fval = ls_mat-matnr )
  ( fnam = 'BDC_OKCODE'  fval = '=ONLI' )
).

data(ls_opt) = value ctu_param( dismode = 'E' defsize = 'X' ).

try.
    call transaction '...' with authority-check
      using lt_bdc options from ls_opt.
  catch cx_sy_authorization_error.
    message i002.
endtry. 



No comments:

Post a Comment

Working with the session Id // ID für den Modus

Sometimes it can be helpful to know the id of the current session     CALL FUNCTION 'TH_GET_CONTEXT_ID'       IMPORTING         cont...