Skip to Content
avatar image
Former Member

"IF" in form

Hi,gurus,

I want to print out the customer purchase order number which just contain "RMA" in the string beginning and "R" in the string end.But the statement as below can't fit my request,can someone tell me anything wrong on it:

/E HEADER_DATA

ZS Sold to party: ,,&cname1&

ZB

ZS Address: ,,&street&

ZB

ZS Receipted By: ,,&name1&

ZB

ZS TEL: ,,&tel_number&

ZB

ZA &'DN:'VBDKL-vbeln&

ZB

ZB

/: IF &VBDKL-BSTKD& CP 'RMA*R'.

ZD &'客户订单号:'VBDKL-BSTKD&

ZB

/: ENDIF.

It will print out all the PO number ,but i just want to print the number which like "RMA*******R"

Thanks advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    May 29, 2008 at 09:24 AM

    this condition will not work in editor...

    try to use this in program....by some logic

    if it is usefull....Plz reward

    Regards

    Anbu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2008 at 09:26 AM

    Hi

    I think 'RMA*R' * is not considered as wild card here. it is taken like a character.

    Try to use strlen an identify last character and then check condition

    Points if useful

    cheers

    vamshi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2008 at 09:20 AM

    Hi,

    Try with IF &VBDKL-BSTKD& CS 'RMA*R'. instead of Cp.

    May it solve.

    Regards,

    Shiva Kumar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2008 at 09:37 AM

    Hi,

    You can try like this.

    E HEADER_DATA
    ZS Sold to party: ,,&cname1&
    ZB
    ZS Address: ,,&street&
    ZB
    ZS Receipted By: ,,&name1&
    ZB
    ZS TEL: ,,&tel_number&
    ZB
    ZA &'DN:'VBDKL-vbeln&
    ZB
    ZB
    /: perform check_po in zprogram using &VBDKL-BSTKD&
                                                   changing &v_flag&.
    /: if flag = 'X'.
    
    ZD &'u5BA2u6237u8BA2u5355u53F7:'VBDKL-BSTKD&
    ZB
    /: ENDIF.
    

    You will have to define v_flag as a flag in the program zprogram.

    and in the program 'zprogram'

    You can do like this

    form check_po using lv_bstkd like istcy
                            changing v_flag like istcy.
    

    In the form you can check if the po number is like what you want and set the flag so that it checks the flag and displays the same.

    Regards,

    Himanshu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2008 at 10:50 AM

    hi,

    This zprogram can be any program any include program or the existing print program.

    Just put your logic and place a debugger that should help you.

    Regards,

    Himanshu Verma

    Add comment
    10|10000 characters needed characters exceeded