2012 Nov 06 10:00 AM
Hi all,
Transaction CO01
We need, after set the fields of the first screen (for example: Material, Production Plant and Order Type), to have some fields of the following screens setted with some values (detemined from custom tables). In particular these fields are:
In 'Maintain Settlement Rule: Overview" screen:
- Cat (COBRB-KONTY)
- Settlement Receiver (DKOBR-EMPGE)
In "Goods receipt" tab:
- Stor. Location (AFPOD-LGORT)
- Goods Receipt (AFPOD-WEPOS)
In "Component Overview" screen:
- Some field of the item rows (these fields can be valorized at saving event)
Note:
We found the exits
CCOWB001
COIB0001
COZF0001...COZF0002
PPCO0001...PPCO0023
STATTEXT
but no one seems to be useful.
We found BAdI WORKORDER_UPDATE (in particular we've noted the methods INITIALIZE-AT_SAVE-IN_UPDATE-BEFORE_UPDATE) but the methods seem not having the necessary parameters.
Any idea? Thanks in advance for all suggestions.
Hi all,
Transaction CO01
We need, after set the fields of the first screen (for example: Material, Production Plant and Order Type), to have some fields of the following screens setted with some values (detemined from custom tables). In particular these fields are:
In 'Maintain Settlement Rule: Overview" screen:
- Cat (COBRB-KONTY)
- Settlement Receiver (DKOBR-EMPGE)
In "Goods receipt" tab:
- Stor. Location (AFPOD-LGORT)
- Goods Receipt (AFPOD-WEPOS)
In "Component Overview" screen:
- Some field of the item rows (these fields can be valorized at saving event)
Note:
We found the exits
CCOWB001
COIB0001
COZF0001...COZF0002
PPCO0001...PPCO0023
STATTEXT
but no one seems to be useful.
We found BAdI WORKORDER_UPDATE (in particular we've noted the methods INITIALIZE-AT_SAVE-IN_UPDATE-BEFORE_UPDATE) but the methods seem not having the necessary parameters.
Any idea? Thanks in advance for all suggestions.
2012 Nov 06 10:17 AM
2012 Nov 06 10:29 AM
2012 Nov 06 11:12 AM
First of all, thank you for the suggestion; in effect I don't know SHD0 transaction so much, but I have the suspect that it does not permit to set a field with a default value in a parametric way (for example put a value 'XXXX' extracted from a Z... table into the Stor. Location field of Goods receipt tab).
Does it?
2012 Nov 06 11:20 AM
2012 Nov 06 11:29 AM
Yes...I also think so, but looking at the parameters of its methods I can't find those ones I need to change. So I'm wondering, and asking here , how I can bypass this limit.
2012 Nov 06 11:36 AM
I think you can use method IF_EX_WORKORDER_UPDATE~INITIALIZE for you purpose in the same BADI , WORKORDER_UPDATE.
And Parameter IS_CAUFVDB will contain the data entered during the runtime.
and you can use the following method inside that
CALL METHOD IS_CAUFVDB->SET_DATA(Work Area) to set the default data
2012 Nov 06 11:54 AM
Perfect and I agree: as written in the question text, this one is the first method I checked.
Of course it has the parameters I need to access the Z... table (in detail: IS_CAUFVDB-WERKS and IS_CAUFVDB-AUART) but how about those ones I need to modify with the values extracted from Z... table?
"....
In 'Maintain Settlement Rule: Overview" screen:
- Cat (COBRB-KONTY)
- Settlement Receiver (DKOBR-EMPGE)
In "Goods receipt" tab:
- Stor. Location (AFPOD-LGORT)
- Goods Receipt (AFPOD-WEPOS)
...."
In other words, when I create the SELECT at Z.... table, how I can modify the fields with the default values extracted?
SELECT SINGLE x k y z INTO (?, ?, ?, ?)
FROM Z....
WHERE wekrs EQ is_caufvdb-werks
AND auart EQ is_caufvdb-auart.
Thanks again.
2012 Nov 06 12:09 PM
2012 Nov 06 12:22 PM
Sorry, my mistake: I have not well explained the concept.
Of course I know the usage of work areas and I understood the suggestion to use SET_DATA method but what I meant is that the structure CAUFVDB hasn't the fields I need to change (refer to previous reply) but only the fields useful to create the where condition of the select. How I can change the content of a field if I haven't that field on line? (...and that's the limit I'm trying to bypass)
2012 Nov 07 4:45 AM
2012 Dec 11 1:34 PM
I solved using both Enhancement points and BAPI BAPI_ALM_ORDER_MAINTAIN (using in particular IT_COMPONENT and IT_SRULE tables): it's the only way.
2014 Jul 15 1:54 PM
I solved using BAPI BAPI_ALM_ORDER_MAINTAIN (IT_SRULE tables only).
- Cost Center
it_srule-objnr = OR000005655300
it_srule-costcenter = P56310G
it_srule-extnr = 001
it_srule_up-costcenter = X
it_srule_up-orderid = X
it_srule_up-extnr = X
- Order
it_srule-objnr = OR000005655300
it_srule-orderid = R56310G
it_srule-extnr = 001
it_srule_up-costcenter = X
it_srule_up-orderid = X
it_srule_up-extnr = X
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |