I have to call transaction MB51 from a custom program and SETing the parameter ID's is not sufficient to pass the selections required. Does any one know how to feed a VARIANT thru a call or modify a variant that the transcation can use?
Software/Hardware used:
ASKED:
August 12, 2004 11:45 AM
UPDATED:
August 13, 2004 10:14 AM
The BDC format for calling a transaction is documented in the online help as:
Example
DATA: BDCDATA TYPE TABLE OF BDCDATA.
DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
DATA: PROGRAM LIKE SY-REPID,
WA_BDCDATA TYPE BDCDATA.
WA_BDCDATA-PROGRAM = ‘SAPMS38M’.
WA_BDCDATA-DYNPRO = ’0100′.
WA_BDCDATA-DYNBEGIN = ‘X’.
APPEND WA_BDCDATA TO BDCDATA.
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = ‘RS38M-PROGRAMM’.
WA_BDCDATA-FVAL = PROGRAM.
APPEND WA_BDCDATA TO BDCDATA.
…
CALL TRANSACTION ‘SE38′ USING BDCDATA MODE ‘N’
MESSAGES INTO ITAB.
Use Mode ‘E’ to call the transaction without seeing the command field messages.
Be sure to do the authority-check for use of the transaction before using Call Transaction or Submitting the report program directly.