‎2009 Mar 24 2:44 PM
Hi all,
I have written a BDC to call transaction OASV. I have to fill a table control which has initial 10 lines in display. I will have more than 10 items to fill in the table control.
But while recording through SHDB i dont get the recording for the page down. However I tried to write the code my self with the OK_CODE as '=P+' as well as 'BDC_OKCODE' as '/00'. Still it is not working. It is over writing the lines once initial 10 lines finishes again when the next set is added. Pls guide me in this.
Thanks and Regards,
Dileep.C.
‎2009 Mar 24 9:34 PM
‎2009 Mar 24 10:43 PM
Hi
Give the OK_CODE = F23
and set DEFSIZE = 'X' in the option of the BDC Call Transaction.
Hope That Helps
Anirban M.
‎2009 Mar 25 6:16 AM
HI Mukherjee,
I tried with OK CODE F23 the cursor is going to next line but not taking new page.
in my case i have 20 records to update in table control but i can insert 10 records in the first page after 10th record cursor is coming again back to first record it is over writing the old 10 records not getting new page for the remaining 10 records.
kinldy check the Below code for u r reference
LOOP AT IT_HEADER_TABLE INTO WA_HEADER_TABLE.
PERFORM BDC_DYNPRO USING 'SAPMA03B' '0100'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RA01B-BLART'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RA01B-BLDAT'
WA_HEADER_TABLE-BLDAT."'01.04.2009'.
PERFORM BDC_FIELD USING 'RA01B-BUDAT'
WA_HEADER_TABLE-BUDAT."'01.04.2009'.
PERFORM BDC_FIELD USING 'RA01B-MONAT'
WA_HEADER_TABLE-MONAT. "'01'.
PERFORM BDC_FIELD USING 'RA01B-BUKRS'
WA_HEADER_TABLE-BUKRS . "'RKD1'.
PERFORM BDC_FIELD USING 'RA01B-BLART'
WA_HEADER_TABLE-BLART."'AA'.
MOVE 1 TO IDX.
DO IDX TIMES.
LOOP AT IT_ITEMS_TABLE INTO WA_ITEMS_TABLE
WHERE RECNO = WA_HEADER_TABLE-RECNO.
PERFORM BDC_DYNPRO USING 'SAPMA03B' '0110'.
CONCATENATE 'RA01B-HKONT(' IDX ')' INTO FNAM.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
FNAM.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=F22'.
CONCATENATE 'RA01B-SHKZG(' IDX ')' INTO FNAM.
PERFORM BDC_FIELD USING FNAM
WA_ITEMS_TABLE-NEWBS." 'H'.
CONCATENATE 'RA01B-PRCTR(' IDX ')' INTO FNAM.
PERFORM BDC_FIELD USING FNAM
WA_ITEMS_TABLE-PRCTR."'C5000'.
CONCATENATE 'RA01B-HKONT(' IDX ')' INTO FNAM.
PERFORM BDC_FIELD USING FNAM
WA_ITEMS_TABLE-NEWKO."'120005'.
CONCATENATE 'RA01B-DMBTR(' IDX ')' INTO FNAM.
PERFORM BDC_FIELD USING FNAM
WA_ITEMS_TABLE-WRBTR." '5000'.
CONCATENATE 'RA01B-SGTXT(' IDX ')' INTO FNAM.
PERFORM BDC_FIELD USING FNAM
WA_ITEMS_TABLE-SGTXT." 'TESTING'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
IDX = IDX + 1.
IF IDX = '10'.
PERFORM BDC_DYNPRO USING 'SAPMA03B' '0110'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'F23'.
PERFORM BDC_DYNPRO USING 'SAPMA03B' '0110'.
CONCATENATE 'RA01B-HKONT(' IDX ')' INTO FNAM.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
FNAM.
IDX = 1.
ENDIF.
ENDLOOP.
ENDDO.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RA01B-HKONT(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=UPDA'.
CTU_PARAMS-DEFSIZE = 'X'.
CTU_PARAMS-DISMODE = 'A'.
CALL TRANSACTION 'OASV' USING BDCDATA OPTIONS FROM CTU_PARAMS
MESSAGES INTO TMESS_MTAB.
CLEAR: IDX.
With Regards
Dileep.c
‎2009 Mar 26 6:07 AM
Hi,
No its not working...same problem...it overwrites the lines after the first 10 lines are inserted...
Anybody done BDC with OASV transaction....
Thanks
Dileep.c
‎2009 Mar 25 1:27 AM
In recording itself take 2 lines for that table control. Enter first line & click on '+' (add new line) button so automatically new empty line will be displayed as first line of the table control, now enter the data and see the generated program of SHDB. Based on that you can program.
‎2009 Mar 26 7:24 AM
Hi Kumar,
Declare a varriable VAL(2) TYPE N VALUE 10.
in the loop when you want to do a page down after 10 row you can use
VAL = VAL + 1.
IF VAL EQ 10.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=POAN'.
PERFORM BDC_DYNPRO USING 'SAPMA03B' '0110'.
VAL = 1.
ENDIF.After the loop make the val = 1 again.
Reagrds, Amit.
Edited by: Amit Biswas on Mar 26, 2009 12:56 PM
Edited by: Amit Biswas on Mar 26, 2009 12:58 PM
Edited by: Amit Biswas on Mar 26, 2009 1:01 PM
‎2009 Mar 26 7:51 AM
HI Amit,
i tried with this code,
VAL = VAL + 1.
IF VAL EQ 10.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=POAN'.
PERFORM BDC_DYNPRO USING 'SAPMA03B' '0110'.
VAL = 1.
ENDIF.
No its not working...same problem...it is not triggering new page and cursor going back to first line .it overwrites the lines after the first 10 lines are inserted...
Thanks
Dileep.c
‎2009 Apr 02 7:31 AM
Hi all,
Issue was not yet resolved. kindly help me out to get the page down.
I have written a BDC to call transaction OASV. I have to fill a table control which has initial 10 lines in display. I will have more than 10 items to fill in the table control.
But while recording through SHDB i dont get the recording for the page down. However I tried to write the code my self with the OK_CODE as '=P+' as well as 'BDC_OKCODE' as '/00'. Still it is not working. It is over writing the lines once initial 10 lines finishes again when the next set is added. Pls guide me in this.
Thanks and Regards,
Dileep.C.
‎2009 Jul 15 12:21 PM
Hi,
Thanks for u r replays.
No solution found. closing thread.