‎2006 Jan 26 5:03 PM
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).. Its not doing 'P+,
Can any one help me in this regards.
Thanks
‎2006 Jan 26 5:09 PM
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
‎2006 Jan 26 5:10 PM
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.
‎2006 Jan 26 5:11 PM
Hi,
Check the BDCDATA internal table,whether is is geting populated with this OKCODE = '+P'.
‎2006 Jan 26 5:16 PM
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
‎2006 Jan 26 5:21 PM
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.
‎2006 Jan 26 5:27 PM
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
‎2006 Jan 26 5:29 PM
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
‎2006 Jan 26 5:34 PM
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
‎2006 Jan 27 7:07 PM
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.