‎2008 Jun 17 11:56 PM
Hi All,
I have a wriiten custom routine (routine no 901) for Pricing in VOFM.Now the thing is the code is written in such a way that, the routine will be called only for transaction VA01 and VA02.But If i want the routine(901) to be executed also through BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_SALESORDER_CHANGE ,then what system parameter i should check in my routine.
Currently the code is like this.
form frm_kondi_wert_901.
Check sy-tocde = 'VA01' or sy-tcode = 'VA02'.
*Process further'....
Endform.
I would appreciate for the valuable input....
Thanks,
Vigneswaran S
‎2008 Jun 18 12:06 AM
Use the strucutre T180.
IF T180-TCODE EQ 'VA01' OR T180-TCODE EQ 'VA02'.
This should solve your problem.
Regards
Sudhir Atluru
‎2008 Jun 18 12:06 AM
Use the strucutre T180.
IF T180-TCODE EQ 'VA01' OR T180-TCODE EQ 'VA02'.
This should solve your problem.
Regards
Sudhir Atluru
‎2008 Jun 18 12:20 AM
Hi Sudhir,
Thanks for your reply.The strucure T180 does not exist in my routine RV64A901 .I am writing a routine in the include RV64A901 which has a main program SAPLV61A.Please help if there is any other parameter can be used?.
Thanks,
Vigneswaran S
‎2008 Jun 18 12:34 AM
Try getting the T180 table from memory.
Assign (SAPMV45A)T180 to a field symbol and access the data.
Regards
Sudhir Atluru
‎2008 Jun 18 12:50 AM
Hi,
Can you explain in detail?.Is there any FM to read the value from memory.
Regards,
Vigneswaran S
‎2008 Jun 18 1:16 AM
Write the following statements in your program.
FIELD-SYMBOLS: <fs> TYPE STANDARD TABLE.
DATA : l_t180(15) VALUE '(SAPMV45A)T180'.
DATA: it_t180 TYPE t180.
ASSIGN (l_180) TO <fs>.
it_t180 = <fs>.
IF it_t180-tcode EQ 'VA01' OR it_t180-tcode EQ 'VA02'
Regards
Sudhir Atluru
‎2008 Jun 18 4:25 AM
Awesome stuff sudhir..It is really a great logic to use..Thanks for ur help..
This is for future generation...
One Note:The field symbol should be declared as type any instead of "standard table".Because the T181 is used as global workarea(strucuture) in SAPMV45A program rather than internal table.
Here you go the modified code.
FIELD-SYMBOLS:<fs_t180> TYPE any .
DATA:wa_t180 TYPE t180,
c_t180(15) TYPE c VALUE '(SAPMV45A)T180'.
ASSIGN (c_t180) to <fs_t180>.
wa_t180 = <fs_t180>.
If wa_t180-tcode = 'VA01' or wa_t180-tcode = 'VA02'.
Endif.
Thanks,
Vigneswaran S