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

BDC_OKCODE = 'P+' IS NOT WORKING ....

Former Member
0 Likes
2,482

Hi folks,

I am doing upload in a screen, it has some pre-populated values in tabular. First time I read excel sheet and insert REC and save it.

Next time I change the “REC” for same employee number, it popup the BDC_OKCODE = 'MOD' and change it and after that in my code I am passing BDC_OKCODE = 'P' . and then after 'P" I am inserting a value.

In BDC what is happening Its first inserting value and then going straight to BDC_OKCODE = '=UPD' (Save).. It’s not doing 'P+”,

Can any one help me in this regards.

Thanks

9 REPLIES 9
Read only

Former Member
0 Likes
1,670

Try to give the same perform 2 times.

like this...

perform bdc_data using: 'X' 'SAPMH5A0' '5100',

' ' 'BDC_OKCODE' '=P+',

' ' 'PPHDR-PLVAR' '01',

' ' 'PM0D1-TIMR6' 'X'.

perform bdc_data using: 'X' 'SAPMH5A0' '5100',

' ' 'BDC_OKCODE' '=P+',

' ' 'PPHDR-PLVAR' '01',

' ' 'PM0D1-TIMR6' 'X'.

Thanks

Eswar

Read only

Former Member
0 Likes
1,670

Please check the way UR Populating the BDCTAB.

If UR in a loop .. endloop

BDC_OKCODE = 'P+' should be in between the loop .. endloop and

BDC_OKCODE = '=UPD' should be the last line I mean after the endloop.

Read only

Former Member
0 Likes
1,670

Hi,

Check the BDCDATA internal table,whether is is geting populated with this OKCODE = '+P'.

Read only

0 Likes
1,670

Hi in BDCDATA I can see the values .. its appending ...

PERFORM sub_bdc_dynpro USING 'MP002800' '2000'.

PERFORM sub_bdc_field USING :

'BDC_CURSOR' 'Q0028-WTFLD(01)' ' ',

'BDC_OKCODE' '=P+' ' ',

'Q0028-SBJKT(01)' '08' ' ',

'Q0028-jnfld(01)' Space ' ',

'Q0028-NMFLD(01)' Space ' ',

'Q0028-WTFLD(01)' Space ' ',

'Q0028-DTFLD(01)' Sy-datum ' ',

'BDC_OKCODE' '=UPD' ' '. "SAVE

I can see these all values in "BDCDATA". But its not working ...

Thanks

Read only

0 Likes
1,670

I guess the page down is happeneing when you press '+P'.But actually you have to insert 2nd record at the 2nd line ,but not in the first line.some times after pressing the page down,the page will scroll to the 2nd record showing the last record in the first line.

Read only

0 Likes
1,670

Page down is '=P+' ... I try to enter this two times but its not taking any effect at all .. it just going to punch the data and UPD .

i also try this out ..but still not working

PERFORM sub_bdc_field USING:

'SAPMP50A' '1000' ' ',

'BDC_CURSOR' 'Q0028-WTFLD(01)' ' ',

'BDC_OKCODE' '=+P' ' '.

Thanks

Read only

Former Member
0 Likes
1,670

Hi Suleman,

This is tricky using "P+" when you don't have add button.

First record you BDC using SHDB with default size.

Then you have to count no of records displaying on default screen then you have to traverse "P+" and insert new record.

Lanka

Read only

0 Likes
1,670

I have already record BDC using SHDB ... like I have 6 Rows in tabular which have pre-populated (DEFAULT) data. First time I enter some data in from of Record 01 and 06 and save it.

Next time I have to add record on ROW 8 , for same record I re-call BDC but this time in Change mode.. And Do 'P+' as per above code but still adding REC on First 6 rows and not doing page down ...

i am uploading in IT 0028 under subtype '9030'.

PERFORM sub_bdc_dynpro USING 'MP002800' '2000'.

PERFORM sub_bdc_field USING:

'RP50G-TIMR6' 'X' ' ',

'BDC_SUBSCR' 'SAPMP50A' ' ',

'BDC_CURSOR' 'Q0028-WTFLD(01)' ' ',

'BDC_OKCODE' '=+P'

PERFORM sub_bdc_field USING :

'BDC_CURSOR' 'Q0028-WTFLD(01)' ' ',

'BDC_OKCODE' '=P+' ' ',

'Q0028-SBJKT(01)' '08' ' ',

'Q0028-jnfld(01)' Space ' ',

'Q0028-NMFLD(01)' Space ' ',

'Q0028-WTFLD(01)' Space ' ',

'Q0028-DTFLD(01)' Sy-datum ' ',

'BDC_OKCODE' '=UPD' ' '. "SAVE

Thanks

Message was edited by: Suleman Javed

Read only

former_member182371
Active Contributor
0 Likes
1,670

Hi,

is it a tablecontrol what you´re trying to populate?
if this is the case usually there is an option in the menu or in a button that allows you to "

go to line n

".

See if there is such an option. if this is the case just do the recording cliking on this option so that the line you´re processing is always the first one in the tablecontrol.

Best regards.