09-19-2016 11:03 AM
Hi All,
for return order I have enhanced the MSEG-DMBTR value inside FM : MB_CREATE_GOODS_MOVEMENT. Now I have to enhance BSEG table for this order. Could you please guide me how can I solve this issue. Please update for more info.
Thanks,
Satya
09-19-2016 11:32 AM
09-19-2016 11:36 AM
Yes.. MSEG-DMBTR is already enhanced and its working perfectly. Now I need to enhance BSEG-DMBTR. Please give me some idea.
Thanks,
Satya
09-19-2016 11:49 AM
But why?
I don't think it's really good idea, but I woul like to know why you need to do it
09-19-2016 12:15 PM
Hi Max,
Here we are getting VPRS value different from material moving cost. And the user want the PGR value as equal to VPRS value in return sales order as well as the material document when we are doing PGR. So I have to enhance the value for only one company code. This is the reason I have to enhance the value.
Thanks,
Satya
09-19-2016 12:02 PM
Did you check compliance of stock valuation when you do such strange operation (*), also how did you enhance MSEG as you should already get the same value in BSEG?
Regards,
Raymond
(*) Try executing transaction S_P6B_12000136 (report RM07MMFI) also check fiscal rules of managed countries.
09-19-2016 12:18 PM
No I did not check for the compliance of sock valuation and I did the enhancement inside FM: MB_CREATE_GOODS_MOVEMENT for MSEG but I didn't get any value for BSEG inside this FM. Please help on this.
Thanks,
Satya
09-19-2016 1:17 PM
Need to enhance the value as per the below print screen.
Thanks,
Satya
09-19-2016 1:33 PM
Ok
So do you want to update the value, I've understood you want to change the dictionary field
In generally the FI document is created by FM AC_DOCUMENT_POST, here the BADI AC_DOCUMENT should be called:
MM transactions should use that function too
Max
09-19-2016 2:37 PM
Hi Max,
I changed the value in runtime using debug mode. But the value are not changing.
Debug mode changes:
Output:
Thanks,
Satya
09-19-2016 3:04 PM
Hi
It's not easy to change the amount of FI item, the data are prepared before calling AC_DOCUMENT_POST,
The fm AC_DOCUMENT_CREATE should be called in order to prepare the accounting data, so if you want to change something, you should do it here
Max
09-20-2016 8:13 AM
I am not able to find out the BSEG data inside the FM. Please help me.
Thanks,
Satya
09-20-2016 10:23 AM
09-20-2016 10:59 AM
Hi Max,
I want to change BSEG-WRBTR value but inside ACCIT i am not able to find out the field.
Could you please tell me which field I have to update that should update the BSEG-WRBTR value.
Thanks,
Satya
09-20-2016 12:21 PM
Look at the methods of a BAdI like AC_DOCUMENT, e.g. method CHANGE_AFTER_CHECK, it handles a parameter type ACC_DOCUMENT, where you will find included the following structures: ACCHD header, ACCIT items, ACCCR amounts, etc. (it also carry a structure for field to change ACC_DOCUMENT_SUBST but much less fields, and no amount field at all)
Also don't expect any unbalanced document to be inserted into database (at least I hope so)
Good luck for next tax audit/fiscal control...
Regards,
Raymond
09-20-2016 1:32 PM
Uhm
sorry, amount are in ACCCR structure, but ACCCR are not available in BADI AC_DOCUMENT, I mean the amount can't be replaced by substitution ,
But there's a chance, it'a a little dangerous, but you can try:
I mean the fm AC_DOCUMENT_CREATE and AC_DOCUMENT_POST are always used if a FI document has to be posted out of FI module, so be carefull!
Anyway AC_DOCUMENT_CREATE and AC_DOCUMENT_POST call a set of function module stored in table TRWPR, the sequence is defined by field SUBNO:
you can create a your own fm (in order to change the values you want),
the problem is the custom fm should be placed from 900 to 999, and you should place your fm in the first positions.
So you should create a fm having an interfaces like FI_DOCUMENT_CHECK, and store it in TRWPR for
- PROCESS = DOCUMENT
- EVENT = CHECK
- SUBNO = ?
As I've written above, I believe SUBNO should be lower number as possible, because the system save the data in the global variables and then it can be very hard to change the value:
you can try to SUBNO = 900 (It's in custom range) and if it doesn't works, try with 1 (it's in SAP range)
Here you can find out documentation:
RWIN Control Table TRWPR: Actual Documents in Cont - Release notes 45A - SAP Library
so as Raymond said.....good luck
09-19-2016 2:20 PM
Hi Satya,
PLease check whether you can apply FI substitution to get your solution. The T_Code is GGB1 and you have to create your form routine at Accounting ITEM data.
Thanks,
Prakash
09-19-2016 2:40 PM
09-19-2016 2:57 PM
Substitution is basically FI exit form , where you can substitute some value at run time for different structure given in that pocess area like BKPF, BSEG , ANLA etc. You will get lost of document on this. Please search for FI substitution in SAP.
Thanks,
Prakash
09-20-2016 2:45 PM
09-21-2016 7:15 AM
Hi Lakshmipathi,
Here I am creating one return order there the VPRS value I changed as per the invoice VPRS value, Earlier the VPRS value is taking from material master moving price. After that when we are doing PGR at that time we have to change the material document currency(MSEG-DMBTR) as well as the accounting document BSEG data.
If you want any other info please update.
Thanks,
Satya
09-21-2016 10:27 AM
09-21-2016 11:26 AM
I checked both the note and both the node are in status 'Cannot be implemented'. Please let me know what to do next.
Thanks,
Satya