on 05-31-2007 2:09 PM
Hello frnds,
I want to automate the creation of settlement rule in VA01. For that i am using the exit EXIT_SAPLKOBS_001. CTR is the control type i am using( hard coding). But i need to find out the settlement receiver( for here .it is cost center from sales order header vbak-kostl) .
exit imports ,
*" REFERENCE(I_OBJNR) LIKE COBRA-OBJNR
*" REFERENCE(I_SLIST) LIKE TKB10SLA-SLIST
*" REFERENCE(I_STRAT) LIKE TKB10SA-STRAT
*" REFERENCE(I_SENDERART) LIKE TKB10STA-SENDERART
Using these parameters how i can calculate ( Based on which parameter) i can get the settlement receiver.
Thanks in advance..
I know it's quite late, but probably someone will search for the solution as I was just today
If you need to get anything from master data of sender (internal order for instance) you need to get temporary data of the object (it's crucial when you create an order and you need proper settlement receiver).
The data are neither stored in the DB at the moment nor transfered via function module interface.
To get the temporary data you need to access the program that maintains master data of the object with proper form and structure which can deliver data you need.
For internal order you can use such coding:
data: ls_coas like coas.
PERFORM get_coas
IN PROGRAM SAPMKAUF changing ls_coas.
Then structure ls_coas is filled with up to date master data of the order is being processed.
For other objects you have to use other forms and programs, but the idea is quite the same.
To learn what program you might use break-point in function module K_SRULE_CREATE_WITH_SL where external form is used to get global data:
*.external perform to get global data from application
PERFORM (i_formname) IN PROGRAM (i_progname)
USING i_objnr
CHANGING lt_strat.
Best regards,
Jacek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.