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

SAP ABAP: Determine Timezone for Plant

    DATA:       lt_tzone TYPE STANDARD TABLE OF tznzone WITH DEFAULT KEY,       l_tzone  TYPE tznzone.     " get time zone for plant   ...