2005 Aug 25 7:26 AM
Hi..
That user-exit allows to check inputs (e.g. correct dates, etc.) for orders.
I have the following problem:
Orders can be booked via account assignments on several other orders.
I need to check that orders from order-class EINV are only booked on orders with order-class 1003.
caufvd_imp doesn't provide this information, and yet I didn't find another user-exit or function-block to get it, although it must be saved in runtime some way!
The account assignments are maintained in a separate screen, but saved with the order-maintain.
Therefor inputs should be checked here as well, should they?
Does anyone have an idea to solve this problem?
Thanks in advance.
Greets
Sven Sondag
2005 Aug 25 7:54 AM
Hi Sven,
If you want to get data from outside the user exit (i.e. from the main program) please see the following blog.
/people/brad.williams/blog/2005/04/25/userexits--how-do-i-access-inaccessible-data
Thanks
Vinod
2005 Aug 26 8:56 AM
Hi Vinod,
that's been a really good hint!
I tried to include following structure:
CONSTANTS: c_dkobr(15) type c value '(SAPLKOBS)DKOBR'.
FIELD-SYMBOLS: <fs_dkobr> type dkobr.
ASSIGN (c_dkobr) to <fs_dkobr>.
v_aufnr = <fs_dkobr>-empge.
The subscreen I mentioned (to maintain the account assignment) is SAPLKOBS, the structure is DKOBR and the field is EMPGE.
Unfortunately there are still 3 mistakes:
1. I need a table as a return, because within the subscreen several account assignments can be made.
2. The structure I get back is empty.
3. The field-symbol is only assigned, if at least on of the entries in the account assignment is changed. Saving without changing one of these entries returns an error.
I hope, one of you can help me.
Thanks in advance
Greets
Sven
2005 Aug 26 9:35 AM
Hi Sven,
If you are looking for accessing internal table, you can find the code in the weblog itself. Here is it.
Data declarations
CONSTANTS: c_xvbap(17) type c value '(SAPMV45A)XVBAP[]'.
FIELD-SYMBOLS: <fs_xvbap> type standard table of vbap.
Now we assign the field symbol to point to the
XVBAP structure which is in SAPMV45A
ASSIGN (c_xvbap) to <fs_xvbap>.
If the structure you are getting is empty, can you check the value before coming to the user exit in debug mode.
Thanks
Vinod
Message was edited by: Vinod C
2005 Aug 30 12:43 PM
Hi Vinod.
Unfortunately I can't create an internal table from the structure.
As well, there's still no data in it, so we decided to wait with the implementation of that issue.
Thanks anyway!
Greets
Sven