‎2011 Dec 07 4:52 AM
Hi All,
I have an existing program which creates sales order using BDC session method.( Actual program uses BAPI to create sales order and in case if any error occurs during creation of sales order BDC session is generated so that user can process it later and i am facing issues in this part of code where it uses BDC)
I wanted to modify this BDC sesion to update the sales order text also. I tried recording VA01 for creationg sales order text unfortunatly it is not capturing the data i am entering in the text fields.
Please suggest if there is any way to create sales order using BDC.
Regards
Sheeba
‎2011 Dec 07 5:00 AM
HI ,
which text you are talking abt , Long text ? ,in that case you can use FM SAVE_TEXT ...check in sdn for sample codes.
regards
Prabhu
‎2011 Dec 07 5:03 AM
Hi Prabhu,
Yes i wanted to update sales order item level text.
But i will not be able to use SAVE_TExT since i dont have sales order number.
As mentioned earlier , i want to update the sale order item text using BDC.
While running BDC session like any other field it should take the sales order text but it is not happening.
Hope you are understanding my problem.
Regards,
Sheeba
‎2011 Dec 07 5:07 AM
Hi Sheeba,
Here you mentioned you are using bapi in thae program.Then why can not you try with bapi and update item text.
Regards,
Madhu.
‎2011 Dec 07 5:10 AM
Hi Madhu,
BAPI is used in the normal scenario there everything works fine. ( I am able to update the item text).
But the program works like this , if BAPI returns any errors ( because of data issue or any other issue - sales order will not be created) we are creating BDC session for the user to process it later. I am facing issue at this stage where I am not able to create the sales order texts using BDC.
I wanted to know if there are anyway to update sales order text using BDC.
Regards
Sheeba
‎2011 Dec 07 5:14 AM
Hi Sheeba,
You can upload the texts using bdc method.Go with either va01 recording or bapi is the option.
Regards,
Madhu.
‎2011 Dec 07 5:22 AM
Hi Madhu,
My issue is with sales order texts using BDC only. I tried recording but it is not capturing the value that i am entering in the text field. ( so that i can replace that value with value from the file). Please try recording once with updating sales order text ( if you have time) you will get to know my issue).
Regards
Sheeba
‎2011 Dec 07 5:38 AM
Hi Sheeba,
Are you getting the screen to keep header text and what is the ok_code you are getting in that screen.
Regards,
Madhu.
‎2011 Dec 07 5:42 AM
Hi Madhu,
'=TP_CREATE' is the OK code i am getting for creating TEXTS. But the text entered are not captured in BDC.
Part of BDC program generated for cretaing sales order texts.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
Regards,
Sheeba
‎2011 Dec 07 5:54 AM
Hi ,
you need following field mappings as well....
SAPLSTXX 1100 X
BDC_CURSOR RSTXT-TXLINE(04)
BDC_OKCODE =EDNP ==>Enter in text editor ,you can skip this.....
RSTXT-TXLINE(02) Test2
RSTXT-TXLINE(03) Test2
RSTXT-TXLINE(04) Test2
you need to save text data in that text editor itself otherise above fields wont be captured in your recordings.
regards
Prabhu
‎2011 Dec 07 5:54 AM
Hi,
Can you try with thi OK_CODE "=KTEX".Please check once.
Regards,
Madhu.
‎2011 Dec 07 6:51 AM
Hi Prabhu,
Your answer was helpful. Now i am able to save texts but by default it saves in the first text available. Even though I am selecting different text that is not captured and it over writes the first available text.
PLease let me know if you have any clue on this.
Regards
Sheeba
‎2011 Dec 07 7:18 AM
Hi Sheeba ,
you mean to say ...updating all texts in FIRST TEXT line , in that case what you can do is
try to put text details in loop, bcos we need to get '*' for each text file format......
SAPLSTXX 1100 X
BDC_CURSOR RSTXT-TXPARGRAPH(04)
BDC_OKCODE =EDNP ==> Enter
RSTXT-TXLINE(03) Test3
SAPLSTXX 1100 X
BDC_CURSOR RSTXT-TXLINE(04)
BDC_OKCODE =EDNP ==> Enter
RSTXT-TXLINE(04) Test4
regards
Prabhu
‎2011 Dec 07 7:23 AM
HI Prabhu,
My issue is related to different text types available. For example I have the folllowing sales order item texts..
1. First name
2. Last Name
3.physical Location
I wanted to update different text for each of these text types.
While recording I am selecting each text type, goign to text editor and updating the text.
But when i re-run the recording i can find that always the first text type is selected ( here first name) and it overwrites in this particular text type.( action for selecting different text type is not working)
Regards,
Sheeba
‎2011 Dec 07 7:32 AM
Hi Sheeba,
you should be careful abt the recordings......what you can do is , in the first recording itself ,try to record all possible text types which will have diff ok_codes (=%_GC 121 22...something like this) and mapping accordingly in your program...
texttype>firstname>text editor>enter data>save in text editor -->press back
texttype ->lastname >text editor>enter data-->save in text editor -->press back
regards
Prabhu
‎2011 Dec 07 12:05 PM
Hi Prabhu,
I am capturing those OK codes for text types but i am getting error like below when processing
E V0 104 Requested function =%_GC 121 22. is not available here.
regards,
Sheeba