Skip to Content

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

batch input: how to scroll in table control , returncode ?

hi friends,

i have a question regarding batch input if the dynpro has a scrollable table control in it:

how can i fill this table with the corresponding values and how can i then scroll down if the number of lines displayed in the dynpro is not sufficient ?

any ideas ? please advise, <REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 29, 2008 6:00 PM

Tags:
Former Member
Former Member replied

See the following ex

FORM UPLOAD_DATA .

DATA: L_PGD LIKE SY-TABIX,

L_PGD1 LIKE SY-TABIX,

L_FLG TYPE C.

LOOP AT I_TAB1.

REFRESH I_BDCDATA.

CLEAR: I_BDCDATA, G_FL, L_SUBRC.

SET PARAMETER ID 'BUK' FIELD I_TAB1-BUKRS.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'RM08M-VORGANG'

'1'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'INVFO-BLDAT'.

PERFORM BDC_FIELD USING 'INVFO-BLDAT'

I_TAB1-BLDAT.

PERFORM BDC_FIELD USING 'INVFO-XBLNR'

I_TAB1-XBLNR.

PERFORM BDC_FIELD USING 'INVFO-WRBTR'

I_TAB1-AMOUNT.

PERFORM BDC_FIELD USING 'INVFO-WAERS'

I_TAB1-CURR.

PERFORM BDC_FIELD USING 'INVFO-BUPLA'

'BTDS'.

PERFORM BDC_FIELD USING 'INVFO-SECCO'

'BTDS'.

PERFORM BDC_FIELD USING 'INVFO-XMWST'

'X'.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=DUMMY'.

PERFORM BDC_FIELD USING 'INVFO-MWSKZ'

'Z0'.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=HEADER_FI'.

PERFORM BDC_FIELD USING 'RM08M-ITEM_LIST_VERSION'

'7_6310'.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'RM08M-VORGANG'

'1'.

PERFORM BDC_FIELD USING 'INVFO-BKTXT'

I_TAB1-BKTXT.

PERFORM BDC_FIELD USING 'INVFO-GSBER'

I_TAB-BUSAREA.

PERFORM BDC_FIELD USING 'INVFO-LIFRE'

I_TAB1-LIFNR.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'RM08M-XWARE_BNK'.

PERFORM BDC_FIELD USING 'RM08M-EBELN'

I_TAB1-EBELN.

PERFORM BDC_FIELD USING 'RM08M-XWARE_BNK'

'2'.

PERFORM BDC_FIELD USING 'RM08M-ITEM_LIST_VERSION'

'7_6310'.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'HEADER_FI'.

CLEAR: CNT, L_PGD, L_FLG.

****Handling Table control

LOOP AT I_TAB2 WHERE EBELN = I_TAB1-EBELN.

L_PGD = L_PGD + 1.

CNT = CNT + 1.

REPLACE C WITH CNT INTO QTY.

REPLACE C WITH CNT INTO AMT.

REPLACE C WITH CNT INTO TAX.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

  • 'DRSEG-MENGE(01)'.

AMT.

PERFORM BDC_FIELD USING QTY

I_TAB2-DMBTR.

PERFORM BDC_FIELD USING AMT

I_TAB2-MENGE.

PERFORM BDC_FIELD USING TAX

'Z0'.

QTY = 'DRSEG-WRBTR(&1)'.

AMT = 'DRSEG-MENGE(&1)'.

TAX = 'DRSEG-MWSKZ(&1)'.

**Check the no.of lines that can be entered in screen at a time.

***If it is filled then scroll

IF L_PGD = 6.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=P+'.

CLEAR L_PGD.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'HEADER_FI'.

CLEAR CNT.

ENDIF.

ENDLOOP.

CLEAR : L_FLG, L_PGD.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_DYNPRO USING 'SAPLMR1M' '6000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=PARK'.

CALL TRANSACTION 'MIR7' USING I_BDCDATA

MODE G_MODE

UPDATE 'S'

MESSAGES INTO I_MESSTAB.

ENDLOOP.

ENDFORM. " UPLOAD_DATA

0 View this answer in context

Helpful Answer

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