Skip to Content
author's profile photo Former Member
Former Member

Condition Checking with " IF " statement....

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2009 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2009 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2009 at 06: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 30, 2009 at 11:08 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.