‎2009 Apr 21 12:23 PM
Hi friends,
We have created Subsitutions and they are working fine.
But now for some particular Sales Orders we dont want them to apply.
Any ideas on this, please.
Thanks.
‎2009 Apr 21 12:42 PM
Under substitutions you can maintain conditions depending on the sales order.
Regards,
Lalit Mohan Gupta.
‎2009 Apr 21 12:58 PM
Thanks.
Could you please let me more about this?
And is there any thing we can do in VA01 user exists so that we should not touch SUBSITUTIONS.
‎2009 Apr 21 1:12 PM
Hi Park,
if VBAK-AUAUR NE 'SD'" As per you requierment.
give your substitution logic
ENDIF.Thanks!
‎2009 Apr 23 10:16 AM
Can you tell me where should i write if VBAK-AUAUR NE 'SD'"...if I write pre-requiste text box if gives me a error.
Under STEP 026, we have already written ...
Plant = '2062' AND
Distr. channel = '26'
The above things needs to be applied only if VBAK-AUAUR NE 'SD'"...
Please help.
‎2009 Apr 23 10:23 AM
If you are using an user exit to susbstitue the field just double click on the user exit say for example it is
U203 it will take you to ABAP editor now
here you can actually trigger your conidtion
for example in your pre requitse you wrote if vbak-auart = 'AG'.
in U203 write the below code
if vbak-vbeln = '123456'.
vbak-field1 = vbak-field2
endif.
So the above substituion will trigger when sales order is AG
and if sales order no. is 123456 then only subsituion will take place
Regards
Bhanu Malik
‎2009 Apr 23 10:48 AM
Hello Park,
Under which "Application Area" / "Call up" point have you declared the substitution? Did you check the "prerequisites" available for this "call-up" point?
Plz revert back.
BR,
Suhas
‎2009 Apr 23 11:08 AM
Thanks for your replies.
I am using Profit Center Accounting and i have almost 450 Steps and I am modifying Step 026.
We want to apply these substitutions (450 Steps) that means the Profit Centers should be applied only when VBAK-SOMEFILED is 'GOOD'.
And under Pre-requistes -- we have
PCASUB-WERKS = '2062' AND
PCASUB-VTWEG = '26'
and under Table Fields - we have Structure PCASUB and SYST.
When if i code VBAK-SOMEFILED is 'GOOD' under Pre-requistes i receive syntax error.
Sorry mates, I am totally confused as I am working on SD module for the first time.
Any ideas....
‎2009 Apr 23 11:18 AM
Hello Park,
If the field is not available in the "Prerequisite", then you cannot use it in the prerequisite condition.
What is the field you want to check?
BR,
Suhas
‎2009 Apr 23 11:43 AM
‎2009 Apr 23 11:44 AM
Hello Park,
If this is the case you need to try a work-around in you code for the exit.
BR,
Suhas
‎2009 Apr 23 12:38 PM
Thanks.
If I write a IF statement at User exit, how can i exit the SUBSTITUTION..any ideas?
I mean....If i code
If VBAK-SOMEFILED is 'GOOD' then..
how do i QUIT this subsititution...
Thank you.
‎2009 Apr 23 1:07 PM
Hello,
You can code like:
FORM XXX.
CHECK VBAK-SOMEFILED = 'GOOD' .
" Code for your exit
ENDFORM.So if VBAK-SOMEFILED is not 'GOOD' , then you donot process the exit code.
BR,
Suhas
‎2009 Apr 23 1:18 PM
Thanks mate.
Will give it a try.
Can I debug the SUBSTITUTIONS..as I added a break point, it failed and it didnt entered.
Thanks
‎2009 Apr 23 1:23 PM
Hello Park,
AFAIK you can debug the code in a substitution.
You can put BREAK <sy-uname> in your code & give it a try.
BR,
Suhas
‎2009 Apr 24 7:50 AM
Thanks Suhas for your help.
When i debugged, I noticed that tables VBAK and VBAP are not filled..any ideas?
‎2009 Apr 27 11:16 AM