Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Page down not working for BDC

anub
Participant
0 Likes
3,092

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++. Still it is not working. It is over writing the lines again when the next set is added. Pls guide me in this.

Thanks and Regards,

Anu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,540

hi

the code should be like this:

perform bdc_field  using 'BDC_OKCODE'  '=P+'.

Regards,

Vishwa.

16 REPLIES 16
Read only

Former Member
0 Likes
2,541

hi

the code should be like this:

perform bdc_field  using 'BDC_OKCODE'  '=P+'.

Regards,

Vishwa.

Read only

BH2408
Active Contributor
0 Likes
2,540

hi ,

I think it is P+.. could you please redo the Recording poperly...

Read only

anub
Participant
0 Likes
2,540

No its not working. Recording is all done properly.

Pls help.

Regards,

Anu.

Read only

Former Member
0 Likes
2,540

Hi

Can u past the code here..

Regards,

Vishwa.

Read only

Former Member
0 Likes
2,540

Hi Anu,

Table controls are not supported in recording, so it won't work try some other method.

Regards,

Prashant.

Edited by: Prashant Kumar Upadhyay on Oct 7, 2008 12:37 PM

Edited by: Prashant Kumar Upadhyay on Oct 7, 2008 12:38 PM

Read only

anub
Participant
0 Likes
2,540

REPORT zbdc_fi_oasv

NO STANDARD PAGE HEADING LINE-SIZE 255.

INCLUDE bdcrecx1.

DATA : g_filename TYPE string.

DATA : BEGIN OF itab OCCURS 0,

bldat(10) TYPE c,

budat(10) TYPE c,

monat(2) TYPE c,

bukrs(4) TYPE c,

blart(2) TYPE c,

ldgrp(4) TYPE c,

hkont(10) TYPE c,

shkzg(1) TYPE c,

dmbtr(13) TYPE c,

prctr(10) TYPE c,

END OF itab.

DATA : BEGIN OF itab_tc OCCURS 0,

bukrs(4) TYPE c,

hkont(10) TYPE c,

shkzg(1) TYPE c,

dmbtr(13) TYPE c,

prctr(10) TYPE c,

END OF itab_tc.

DATA : counter(2) TYPE n,

counter1(5) TYPE n,

ihkont(15) TYPE c,

ishkzg(15) TYPE c,

idmbtr(15) TYPE c,

iprctr(15) TYPE c.

PARAMETERS: p_fname LIKE rlgrap-filename OBLIGATORY.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

IMPORTING

file_name = p_fname.

g_filename = p_fname.

START-OF-SELECTION.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = g_filename

filetype = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = itab.

LOOP AT itab.

MOVE-CORRESPONDING itab TO itab_tc.

APPEND itab_tc.

CLEAR itab.

ENDLOOP.

PERFORM open_group.

SORT itab.

SORT itab_tc.

DELETE ADJACENT DUPLICATES FROM itab COMPARING bukrs.

LOOP AT itab.

PERFORM bdc_dynpro USING 'SAPMA03B' '0100'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RA01B-LDGRP'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

PERFORM bdc_field USING 'RA01B-BLDAT' itab-bldat.

" '01.04.2008'.

PERFORM bdc_field USING 'RA01B-BUDAT' itab-budat.

" '01.04.2008'.

PERFORM bdc_field USING 'RA01B-MONAT' itab-monat.

" '1'.

PERFORM bdc_field USING 'RA01B-BUKRS' itab-bukrs.

" '1111'.

PERFORM bdc_field USING 'RA01B-BLART' itab-blart.

" 'aa'.

PERFORM bdc_field USING 'RA01B-LDGRP' itab-ldgrp.

" '0L'.

PERFORM bdc_dynpro USING 'SAPMA03B' '0110'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RA01B-PRCTR(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

PERFORM bdc_dynpro USING 'SAPMA03B' '0110'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

counter = '01'.

*

LOOP AT itab_tc WHERE bukrs EQ itab-bukrs.

CONCATENATE 'RA01B-SHKZG(' counter ')' INTO ishkzg.

PERFORM bdc_field USING ishkzg itab_tc-shkzg.

CONCATENATE 'RA01B-PRCTR(' counter ')' INTO iprctr.

PERFORM bdc_field USING iprctr itab_tc-prctr.

CONCATENATE 'RA01B-HKONT(' counter ')' INTO ihkont.

PERFORM bdc_field USING ihkont

itab_tc-hkont.

CONCATENATE 'RA01B-DMBTR(' counter ')' INTO idmbtr.

PERFORM bdc_field USING idmbtr

itab_tc-dmbtr.

IF counter = '10'.

PERFORM bdc_dynpro USING 'SAPMA03B' '0110'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RA01B-PRCTR(01)'.

PERFORM bdc_field USING 'BDC_OKCODE' '=P++'.

CLEAR : counter.

ENDIF.

CLEAR : ishkzg, iprctr, ihkont, idmbtr.

counter = counter + 1.

ENDLOOP.

PERFORM bdc_dynpro USING 'SAPMA03B' '0110'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RA01B-HKONT(03)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=UPDA'.

PERFORM bdc_transaction USING 'OASV'.

ENDLOOP.

PERFORM close_group.

Read only

Former Member
0 Likes
2,540

Hi

IF counter = '10'. "also no need of dynpro here again.
PERFORM bdc_field USING 'BDC_CURSOR'
'RA01B-PRCTR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE' '=P+'. "it is not P++, just P+.

After Making the above change also, if it is not working then change it this way:

IF counter = '10'. "also no need of dynpro here again.
PERFORM bdc_field USING 'BDC_OKCODE' '=P+'. "it is not P++, just P+.

Revert back with the results.

Regards,

VIshwa.

Edited by: vishwa sri hari on Oct 7, 2008 4:20 PM

Edited by: vishwa sri hari on Oct 7, 2008 4:21 PM

Read only

Former Member
0 Likes
2,540

Hi Anu,

My Issue is resolved. Thansk for your code.

Regards,

Deepthi.

Read only

Former Member
0 Likes
2,540

Hi Deepthi,

Could you please let me know how you have solved this issue?? i am also facing same issue?

Thanks

Dileep.C

Read only

anub
Participant
0 Likes
2,540

No Vishwa...Am still getting problem...I have done both the ways...no improvement.

When I debug the transaction OASV, I find SY-UCOMM to be P++ only...but when i put the same command in the perform it is not accepting..the same with P+.

Regards,

Anu.

Read only

Former Member
0 Likes
2,540

Comment the line and once again write the code ( Dont copy and paste, type maunally) .

Remove the Single codes and rewrite the single codes.

type this.....

PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.

Regards,

Vishwa.

Read only

anub
Participant
0 Likes
2,540

No its not working...same problem...it overwrites the lines after the first 10 lines are inserted...

Anybody done BDC with OASV transaction....

Regards,

Anu.

Read only

Former Member
0 Likes
2,540

Hi,

Trying using the Insert button of the Table Control Toolbar...to Insert every new line item......

Read only

anub
Participant
0 Likes
2,540

Thank you friends for your answers, however I am unable to get the required output yet. It is just not showing in recording also. The table need to be updated manually. I myself have not encountered such a problem and I am quite surprised.

Anyways I am closing this thread.

Thank you once again.

Regards,

Anu.

Read only

Former Member
0 Likes
2,540

Hi Anu,

Could you please let me us know how you have solved this issue?? i am also facing with similar kind of issue?

Thanks

Read only

Former Member
0 Likes
2,540

Hi Anu,

Could you please let me us know how you have solved this issue?? i am also facing same issue?

Thanks

Dileep.C