2009 Mar 16 3:35 PM
Hello everyone,
I have IDOC created for incoming sales order using FM 'IDOC_INPUT_ORDERS'.
When a sales order is created manually iva VA01, it prevents the order from being saved when a specific error is hit unless user resolved it first. However, when the order is created via EDI IDOC, the error is hit and it cannot be created. In the sapmv45a program, i will to say that if it is an EDI IDoc transacion for the order, let it bypass the error and create the order.
Can anyone pls tell me how to check the status of a sales order being created using EDI IDOC ?
Sy-batch does not work.
Thank you in advance.
Joyce
2009 Mar 17 3:56 PM
2009 Mar 16 3:38 PM
2009 Mar 16 7:25 PM
HI Gautham,
What is the difference between WE02 and WE05 ? Do you know what the program RBDAPP01 is for ?
Thanks
Joyce
2009 Mar 16 7:27 PM
You can also try BD87, here you can reprocess the IDOC again.
Kuntal.
2009 Mar 16 7:32 PM
Hi Kuntal,
I actually do not want to use BD87 to reprocess the IDOC. I need IDOC to be pushed through in the background when the inbound sales order is coming in. Therefore, is there a way in sales order program to check the status of the IDOC while the order is not created yet ?
Thanks
Joyce
2009 Mar 16 7:37 PM
Now the only way I can think is the user name from VBAK table. If this comes throgh EDI, it will always be a specific user ID set by the BASIS team. So create a SO throgh IDOC and check the VBAK-ERNAM field.
Thanks.
P.S. - If I can think of any better way, I will update this
2009 Mar 16 5:28 PM
2009 Mar 16 7:34 PM
Hi Shital,
Thanks for the info. Do you or anyone know what the program RBDAPP01 for ?
The inbound sales order is created automatically. We used to run program RBDAPP01 to post the inbound sales order but not using it anymore. So why we do still need program RBDAPP01 ?
Thanks
Joyce
2009 Mar 16 7:48 PM
In SE38 : give the program name and select radio button documentation. You will get your answer
By the way this is for just to change the status. I don't think this will help you.
Kuntal
2009 Mar 16 8:03 PM
Hi Kuntal,
In my partner profile, i have defined processing by Function Moduele to "Trigger Immediately'.
Though this option is selected, can i still run RBDAPP01 to get post the IDOC (status 53) ?
thanks
Joyce
2009 Mar 16 8:07 PM
We usually use this report, to change the existing IDOC status. This will not create a new IDOC, this will just change your IDOC status. I think you can use the user name to distinguish standard and EDI, it should work.
Kuntal
2009 Mar 16 8:22 PM
Kuntal,
Since you use this report often, is it still ok to run this report while we have selected option 'Trigger Immediately' in the partner profile ?
Thanks
Joyce
2009 Mar 16 8:26 PM
Hi Kuntal,
What is the processing mode you use ? Is it 'Trigger Immediately 'or 'Trigger by Background Program '?
Joyce
2009 Mar 16 8:33 PM
Trigger Immediately, But definitely it will depends on your requirement.
Kuntal
2009 Mar 17 3:46 AM
To minimize the load on System its better to do it in Background program mode.
So in Prod mostly it can be Background program.
But If Business says that the Data Should be present in System as and when the IDOC is transmitted to the system then go for Immediate Mode.
Hope this clarifies, pls let me know what you think.
Regards
Shital
2009 Mar 17 3:21 PM
Hi Kuntal,
Thank you for your help. Your suggestion to use username helps out.
Joyce
2009 Mar 17 3:29 PM
2009 Mar 17 3:57 AM
Hi Joyce,
RBDAPP01 program is not just for change the status of an idoc this program is use to repocess your idoc which is in 64(document Ready to post) status. So, first of all check your idoc's status in transaction WE02 at receiving system then go for processing. Hope you know how to process in background. If you need any more help then please let me know.
Thanks,
Asit Purbey.
2009 Mar 17 3:30 PM
Hi Asti,
Thanks for clarifying the usage of Triggering mode. It is helpful.
Joyce
2009 Mar 17 3:33 PM
Hi Asit,
Do you know the difference between WE02 and WE05 ?
thanks
joyce
2009 Mar 17 3:36 PM
Use this.
[difference between WE02 and WE05|https://forums.sdn.sap.com/click.jspa?searchID=23637211&messageID=1673929]
2009 Mar 17 3:56 PM
2009 Mar 17 4:02 PM
Just an remark/addition.
I wouldn't go for the user name, that may change in the future.
Normally, when a sales order is created through an IDOC, the field RV45A-DOCNUM will hold the IDOC number.
If you need to check, go for that field and not the user name.
Good luck!
2009 Mar 17 6:34 PM
Hi Maen,
You brought up a good point. Thank you for your reply.
Joyce
2009 Mar 17 7:12 PM
Yes this is a goof info for me as well. Thanks for the information.
Kuntal
2009 Mar 17 11:39 PM
Joyce,
Whenever an order is being created by FM IDOC_INPUT_ORDERS, it set memory ID SD_EDI_ACTIVE with a value 'SDEDI'. You can IMPORT from this memory to check if the order is being created by EDI.
Gajendra.
2009 Mar 18 2:31 PM
Hi Gajendra,
I like your idea of importing the memory id. However i am unable to import the id over.
In the FM, it has:
CONSTANTS: da_edi_sign(5) VALUE 'SDEDI'.
EXPORT da_edi_sign TO MEMORY ID da_memory_id.
In another program, i like to import this over. I tried using the following but it is not working:
IMPORT v_memid FROM MEMORY ID 'da_memory_id'.
thank you.
Joyce
2009 Mar 18 3:45 PM
Joyce,
If you pay attention the code in FM it is exporting value of da_edi_sign to memory id "SD_EDI_ACTIVE" stored in constant "da_memory_id". ('CONSTANTS: da_memory_id(13) VALUE 'SD_EDI_ACTIVE'.)
In your program you have two you have two options.
1. Declare a constant as in the FM and use that as mentioned below:
CONSTANTS: da_memory_id(13) VALUE 'SD_EDI_ACTIVE'.
IMPORT v_memid FROM MEMORY ID da_memory_id.
2. Hardcode memory id as below:
IMPORT v_memid FROM MEMORY ID 'SD_EDI_ACTIVE'.
Hope this resolves your problem.
Gajendra
2009 Mar 18 4:24 PM
Hi Gajendra,
I put in my program which is a user exit in sapmv45a. The v_memid comes out blank.
By right, it should have SEDI as the value, right ? I wonder if there must be many calls affected that change the value of the memory id. Thanks for your help.
Joyce
2009 Mar 18 5:13 PM
Joyce,
Ideally you should get 'SDEDI' value from the memory location if the order was being created via EDI. If this doesn't work you can always check for a value in field RV45A-DOCNUM as mentioned by Maen Anachronos. If it is populated that means the EDI is active.
Gajendra
2009 Mar 18 5:25 PM
Hi Gajendra,
I would think using RV45A-DOCNUM would be easier. Still i like your idea too.
Appreciate your reply.
Thanks
Joyce
2009 Mar 19 12:31 PM
>
> Hi Gajendra,
> I put in my program which is a user exit in sapmv45a. The v_memid comes out blank.
> By right, it should have SEDI as the value, right ? I wonder if there must be many calls affected that change the value of the memory id. Thanks for your help.
>
> Joyce
If you define your variables in the user exit, they will be locally visible. In the past i had problems with importing memory id's into a locally defined variable. Once i declared it globally, the problem would be solved.
Anyway, try to define your variables globally: there's a customer include to define your own global data/variables.
2009 Mar 19 7:37 PM
HI Maen,
I declared the da_memory_id as global variable in my program which is part of mv45atop. There is the v_memid which is declared local that import the data from da_memory_id. However v_memid is still blank. Your suggestion should work but something is still not passed to it. Thank you for your thoughts.
Joyce
2009 Mar 17 5:49 PM
2009 Mar 18 2:32 PM
2009 Mar 18 3:37 PM