Skip to Content
0
Former Member
Mar 30, 2009 at 05:45 AM

Condition Checking with " IF " statement....

120 Views

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