R3_SET_BDCDATA

Use the R3_SET_BDCDATA script element to define Batch Data Communication (BDC) data. It lets you assign values to screen fields in batch mode. The SAP Agent stores these assignments in an internal table, which is then processed and reset by the R3_CALL_TRANSACTION script element.

First, call R3_SET_BDCDATA with the PROGRAM=, DYNPRO=, and DYBEGIN= parameters to identify the screen form. Then use FNAM= and FVAL= to assign values to the required fields. You can repeat these definitions for the same or other screen forms as often as needed.

Transaction: -

Interface: AE

Syntax

To identify the screen form:

R3_SET_BDCDATA PROGRAM=...,DYNPRO=...[,DYBEGIN=...]

To assign values to screen fields:

R3_SET_BDCDATA FNAM=...,FVAL=...

Parameters

Parameter Description Format Allowed Values Default Value
PROGRAM= Program name. Maximum 40 characters. Script literal n.a. n.a.
DYNPRO= Four-digit screen number Script literal n.a. n.a.
DYBEGIN=

(Optional)

Controls whether a new screen form starts Script literal
  • "" — No new screen form starts
  • X — A new screen form starts
""

Field Assignment Parameters

Parameter Description Format
FNAM=

Field name.

Maximum 132 characters.

Script literal
FVAL=

Value to assign to the field.

Maximum 132 characters.

Script literal

Examples

The following example fills the screen forms of the SA38 transaction with BDC data and then calls the transaction to process a data update.

R3_SET_BDCDATA PROGRAM="SAPMS38M", DYNPRO="0101", DYBEGIN="X"

R3_SET_BDCDATA FNAM="BDC_OKCODE", FVAL="=SSET"

R3_SET_BDCDATA FNAM="RS38M-PROGRAM", FVAL="RSEINB00"

R3_SET_BDCDATA PROGRAM="SAPLSVAR", DYNPRO="0302", DYBEGIN="X"

R3_SET_BDCDATA FNAM="BDC_OKCODE", FVAL="=CHNG"

R3_SET_BDCDATA FNAM="RSVAR-VARIANT", FVAL="UM-V1"

R3_SET_BDCDATA FNAM="RSVAR-FLAG1", FVAL="X"

R3_SET_BDCDATA PROGRAM="RSEINB00", DYNPRO="1000", DYBEGIN="X"

R3_SET_BDCDATA FNAM="BDC_OKCODE", FVAL="=SAVE"

R3_SET_BDCDATA FNAM="P_FILE", FVAL="test.txt"

R3_SET_BDCDATA PROGRAM="RSEINB00", DYNPRO="1000", DYBEGIN="X"

R3_SET_BDCDATA FNAM="BDC_OKCODE", FVAL="=VBAC"

R3_SET_BDCDATA PROGRAM="SAPLSVAR", DYNPRO="0302", DYBEGIN="X"

R3_SET_BDCDATA FNAM="BDC_OKCODE", FVAL="/EBACK"

R3_SET_BDCDATA PROGRAM="SAPMS38M", DYNPRO="0101", DYBEGIN="X"

R3_SET_BDCDATA FNAM="BDC_OKCODE", FVAL="=BACK"

R3_CALL_TRANSACTION CODE="SA38", UPDATE="S"

See also: