03-30-2009 6:45 AM
Hi All,
In one of my requirement ,the existing scenario is like this: IF currency is USD, then call subroutine X
ELSE call subroutine Y. i.e if po_headers-waers = 'USD'
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' 'US4'.
else.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' po_headers-waers .
endif.
(The above code first check if po_header currency value is 'USD' then it calls subroutine to convert the currency to US4,else it calls other subroutine to convert currency as per po_header currency value.)
Now my new requirement is : if po_header currency value is USD and po item value(po_items-netpr) is greater than '10000000.00', then call subroutine to convert it into USD, else for po_header currency value USD and po item value(po_items-netpr) is lesser than '10000000.00', call subroutine to convert into US4(as written above US4 code line).
I have inserted code for the condition like this:
if po_headers-waers = 'USD'
and po_items-netpr GE '10000000.00'.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' po_headers-waers.
else.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' 'US4'.
endif.
But it only satisfies one condition i.e for po_items-netpr >= '10000000.00' with currency as USD , it is converting to USD,but for po_items-netpr < '10000000.00' with currency as USD, it is not converting to US4.where i am missing the steps? can you all through some light.
Thanx.
Deb
03-30-2009 6:48 AM
if po_headers-waers = 'USD'
and po_items-netpr GE '10000000.00'.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' po_headers-waers.
else.
if po_items-netpr LE '10000000.00'. " Use If condition here
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' 'US4'.
endif.
endif.
regards,
gurpreet
03-30-2009 6:49 AM
hi,
Modify the code as following.
if po_headers-waers = 'USD' .
if po_items-netpr GE '10000000.00'.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' po_headers-waers.
else.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' 'US4'.
endif.
endif.
Regards
Sharath
03-30-2009 7:03 AM
Hi try using this.
if po_headers-waers = 'USD'.
if po_items-netpr GE '10000000.00'.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' po_headers-waers.
else.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' 'US4'.
endif.
endif.
reaghrads
03-30-2009 12:08 PM
Hi !
if po_headers-waers = 'USD'.
if po_items-netpr GE '10000000.00'.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' po_headers-waers.
else.
Perform fill_bdc_table using ' ' 'RV61A-KOEIN(01)' 'US4'.
endif.
endif.
Edited by: Paresh Gangani on Mar 30, 2009 1:08 PM