2007 Mar 11 9:36 AM
I am updating the delivery document data(DESADV message type and Delevry03 basic type with some enhanced idoc type zdelvry03). First of all my dought here is like i need to do some validations.
Like I am checking the
1.Checking ASN numeber coming from EDI with SAP data(LIKP-LIFEX). If the delivery document doesnt exist in SAP database tables(LIKP). I need to create the delivery document.
2.If delivery document exists, Yet GR(Goods Receipt has not done means, delete the old inbound delivery and create the new inbound delivery.
3. If delivery document exist and GR also done means update the idoc with status as " GR done for the PO".
Here my dought is like shall we keep all the validations logic inside in the exits of FM "idoc_input_desadv1' or do i need to create one seperate FM?
What are the import and Export parameters i need to make use in new FM?.
This is very urgent so please help..
2007 Mar 15 5:29 PM
Hello , did not see this post before, whatever you need to validate can be done in the user-exits, no need of making a new FM for that. ANd in any case your inbound process code is going to call only whatever FM is attached to it.
2007 Mar 15 8:47 PM
Hi,
First you try to findout is there any right exit for you, i think you can find around 20 exits in the function module 'Idoc_Input_DESADV'. I understood that you are using extended idoc too, so there are more chances to use customized inbound function module.
In our case also we have extended idoc, so I copied the standard FM and customized based on the requirements. Mostly its based on the requirements, if requirements are more and can't able to findout the right place in insert in the standard fm, then you need to create new fm. Please let me know if you need any further information.
Thanks
Satya
**reward, if its useful**
2007 Mar 16 12:38 PM
Hi,
Thanks for the replies.
But here my dought is like in the FM(idoc_input_desadv1) i couldnt able to see any BDC or BAPI for uploading the data. Please let me know is there any other procedure that is following for updating the data.
Here i am updating one z-field into likp table. Now i would like to post the enhanced idoc type to update the LIKP table.The zfield is going to maintain at the header level. So please let me know the enhancement where exactly we can code the data.
This field is not maintained in the transaction level. Do we directly update the database without maintaining the field in the transaction level.
Your prompt response should be greatly useful to me.
2007 Mar 16 3:02 PM
ok I think you are a bit confused here.
But first let me address your question then read what I have to say.
idoc_input_desadv1 if the function module used by the idoc to update SAP ( including your tables).
So in your FM, check out this exit CALL CUSTOMER-FUNCTION '005' ( EXIT_SAPLV55K_005). Once inside you will see the include ZXTRKU13.
Out here you can include your code to populate your zfield from the Idoc.
********************************************************************************
The process code attaches the idoc to the Function module.
Now you can order the process code to call some other FM.
you won't find another BAPI or BDC inside this.
A BDC is another way to updating data and can be used instead of an Idoc.
Meaning you get a file which you convert to SAP format and update SAP using BDC's.
BAPI is nothing but a FM which can be called from outside of SAP, used to integrate SAP and non-sap or sap components.
Go here
http://help.sap.com/saphelp_nw04/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm
See process code BAPI.
Regards