07-10-2008 5:36 PM
Hi ,
I am working on user exit : EXIT_SAPLIEDI_001 (Include ZXF06U01). I am replacing a GL Account number with a different account number in this user exit.
I need to replace GL account only for one particular oder type. But Order Type is not available in this user exit to do a check for order type.
Is there a way to get order type?.
Atleast if i can get the reference document number(BKPF-XBLNR) based on that i can get sales document info(order type)..
Is there a function module?
Any suggestions on this helpful.
Thanks
07-10-2008 6:07 PM
Hello.
In debug, check which is the program that calls the exit. If the field you want is not a parameter to your exit, but is a variable of one of the standard programs that are being executed in that action, you can get the values this way (suposing that program 'SAPPROG' is the one that calls your exit and contains value of BKPF-XBLNR.
FIELD-SYMBOLS: <xblnr> TYPE xblnr,
DATA: name(30) VALUE '(SAPPROG)BKPF-XBLNR'.
ASSIGN (name) TO <xblnr>.
EDIT
I was looking for the program that calls your exit and found this:
(LIEDIF2T)XBBKPF-XBLNR
Regards,
Valter Oliveira.
Edited by: Valter Oliveira on Jul 10, 2008 6:10 PM
07-10-2008 5:47 PM
you can not change the import/export parameters of the user exit. you will need to find a new one which will have the data you need or if available, I would suggest using implicit enhancements.
thanks
07-10-2008 8:52 PM
Thanks for your response. Could you please provide me an example. That will be helpful..
07-10-2008 6:07 PM
Hello.
In debug, check which is the program that calls the exit. If the field you want is not a parameter to your exit, but is a variable of one of the standard programs that are being executed in that action, you can get the values this way (suposing that program 'SAPPROG' is the one that calls your exit and contains value of BKPF-XBLNR.
FIELD-SYMBOLS: <xblnr> TYPE xblnr,
DATA: name(30) VALUE '(SAPPROG)BKPF-XBLNR'.
ASSIGN (name) TO <xblnr>.
EDIT
I was looking for the program that calls your exit and found this:
(LIEDIF2T)XBBKPF-XBLNR
Regards,
Valter Oliveira.
Edited by: Valter Oliveira on Jul 10, 2008 6:10 PM
07-10-2008 8:08 PM
Hi Valter,
i tried as you mentioned
Function Module: IDOC_INPUT_INVOIC_FI
FIELD-SYMBOLS: <xblnr> TYPE xblnr.
DATA: name(16) VALUE '(LIEDIF2T)XBBKPF-XBLNR'.
ASSIGN name TO <xblnr>.
But the structure is not populated itself...XBBKPF..
Thanks,
Renu.
Edited by: renuka tadishetti on Jul 10, 2008 9:09 PM
07-10-2008 8:13 PM
Hi renuka,
Try the program name: SAPLIEDI
FIELD-SYMBOLS: <xblnr> TYPE xblnr.
DATA: name(16) VALUE '(SAPLIEDI)XBBKPF-XBLNR'.
ASSIGN name TO <xblnr>.
Regards,
ravi
07-10-2008 8:41 PM
Hi Ravi,
I tried it out.
It's the samething. Structure is not populated.
Thanks,
Renu.
07-10-2008 10:33 PM
Hi again.
Insert a break-point where your exit is called (se37, your exit function, where-used-list ...), just before statement:
CALL CUSTOMER FUNCTION 'EXIT...'
Then, in debug, globals tab, find a variable that is populated with what you need. After that, use it with the same techinque in you exit.
Regards.
Valter Oliveira.
07-14-2008 8:44 PM
Hi Vlater,
The information i needed was not populated...i need the reference document number (BKPF-XBLNR).
If i have this reference document number i can get the order type using the below logic:::
it is same as the Subsequent sales and distribution document (VBFA-VBELN).
Get the field VBFA-VBELV for the line item with field VBFA-VBELN, which is sales doc number in VBAK-VBELN. Form this line you can get the sales doc type (VBAK-AUART).
I am still trying to find from where to get the reference document number.
Thanks,
Renu.
07-14-2008 10:27 PM
(SAPLIEDI)IDOC_DATA-SDATA
sdata has xbelnr (reference document number in it)
Issue resolved.
Thank You all for your help!
10-22-2008 10:34 AM
hi:
I got the same problem.how to deal with it?could you tell me the detail?
thank you.
08-11-2009 7:07 AM
Hi Renuka
I'm getting the same issue.
Can you please let me know how to solve this.
Thanks
Senthil.
07-10-2008 7:31 PM
Hi,
Check for an exit where you can export the order type or the reference document number. Then in the EXIT_SAPLIEDI_001 (Include ZXF06U01) you can import the same and use it for your purpose. Once you are done you can clear the memory id.
Thanks.