cancel
Showing results for 
Search instead for 
Did you mean: 

"IF" in form

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

this condition will not work in editor...

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

if it is usefull....Plz reward

Regards

Anbu

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

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

May it solve.

Regards,

Shiva Kumar