Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with So10

Former Member
0 Likes
722

Hi All ,

I am facing problem in So10 , I have added a IF ELSE conditionin So10 but the condition is not working .

Both text are printing in output , Please find the below piece of code and kindly help

/* INVOICE

/: DEFINE &W_CHECK&

/* IF &GS_HD_ORG-COMP_CODE& = '5250' AND &GS_HD_ORG-SALESORG& = 'RO10'

/: IF &W_CHECK& = 'X'

  • Cancelled Invoice

/: ELSE

  • INVOICE

/: ENDIF

In form its printing both 'Cancelled Invoice' and 'Invoice' .

thanks

3 REPLIES 3
Read only

Former Member
0 Likes
573

I've never seen this done from standard text (SO10), but you don't have a defintion for W_CHECK...try:

/: DEFINE &W_CHECK& = 'X' 
   or
/: DEFINE &W_CHECK& = ' '.

Read only

Former Member
0 Likes
573

Hi,

Try with


/: DEFINE &W_CHECK& := 'X'.
/: IF &W_CHECK& = 'X'
* Cancelled Invoice
/: ELSE
* INVOICE
/: ENDIF

Read only

Former Member
0 Likes
573

Hi Nusrat,

Dont write the code in So10 instead use it in the form layout itself. But if you using the same text in many places, use a subroutine pool and create a subroutine to check these global variable values and return a changing parameter such as lv_flag which can be used to check whether you should print this include text or not.

This ensures this So10 text to other applications also without these variables. Reusability will be more. Where as defining the variable here is also a good option.

Best Regards,

Tapodipta Khan.