Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reading screen fields during batch input

I am trying to write a batch upload program using the transaction FB50 and one of the screens, SAPMF05A, displays multiple lines of different tax amounts which I need to populate based on the displayed tax codes.

Have been trying to use FM DYNP_VALUES_READ to read the values of the screen fields but never succeeded in getting any proper return values, L_VALUE. Below is the code block, what am I doing wrong?

MOVE VI_ROW_COUNT TO VC_ROWNUM.

L_LNO = STRLEN( VC_ROWNUM ).

IF L_LNO <= 1.

CONCATENATE '0' VC_ROWNUM INTO VC_ROWNUM.

ENDIF.

CONCATENATE 'BSET-MWSKZ(' VC_ROWNUM ')' INTO L_FLD.

CONDENSE L_FLD NO-GAPS.

T_DF-FIELDNAME = L_FLD.

APPEND T_DF.

L_REPID = SY-REPID.

L_SCRNR = SY-DYNNR.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = L_REPID

dynumb = L_SCRNR

TABLES

dynpfields = T_DF

EXCEPTIONS

invalid_abapworkarea = 1

invalid_dynprofield = 2

invalid_dynproname = 3

invalid_dynpronummer = 4

invalid_request = 5

no_fielddescription = 6

invalid_parameter = 7

undefind_error = 8

double_conversion = 9

stepl_not_found = 10

OTHERS = 11.

READ TABLE T_DF WITH KEY FIELDNAME = L_FLD transporting FIELDVALUE.

IF SY-SUBRC EQ 0.

L_VALUE = T_DF-FIELDVALUE.

ELSE.

L_VALUE = '999'.

ENDIF.

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question