‎2012 Feb 15 1:13 PM
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
‎2012 Feb 15 2:11 PM
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& = ' '.
‎2012 Feb 15 2:36 PM
Hi,
Try with
/: DEFINE &W_CHECK& := 'X'.
/: IF &W_CHECK& = 'X'
* Cancelled Invoice
/: ELSE
* INVOICE
/: ENDIF
‎2012 Feb 15 8:14 PM
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.