‎2007 Oct 23 6:09 AM
Hi,
I am facing a weird problem in script, it is skipping a text element and not printing relevant info.
I found out in debug mode. Driver program is calling the Write_form for that text element, then control went to particular text element of that layout. u can see below code , the control is going to /E E1 line.
then i have an if condition like &ekko-bstyp& = 'F'. at the first line it self i checked ekko-bstyp value and find it is equal to 'F' only.
/E E1.
/: IF &EKKO-BSTYP& = 'F'.
/: INCLUDE ZM_SA_TERMS_6200 OBJECT TEXT ID ST PARAGRAPH Y6 LANGUAGE EN
/: ENDIF.
From the first line /E i pressed F5 then it is not even going to second line If cond part. Directly it is coming out and not printing any thing for that window.
how can we know whether that piece of code executed or not ? and how can see the content of that particular window at run time?
Can any one provide me any inputs reg this problem? Please help me out.
Thx in advance.
PRa
‎2007 Oct 23 6:11 AM
Hi,
I believe the TEXT ELEMENT /E E1 will work in the main window..and not in other windows..
Thanks
Naren
‎2007 Oct 23 6:14 AM
naren,
How can u tell that it will execute with MAIN window??
actually the text element is associate with another window and driver program calling that window exclusively using WRITE_FORM.
Pra
‎2007 Oct 23 6:15 AM
Hi,
After the IF condition, print some string like "'Test Program" or so. If this gets printed, it will make sure that control gets into the IF block. Later you can remove this string. Also check if that respective does exist using SO10?
Hope this helps.
ashish
‎2007 Oct 23 6:21 AM
Ashish,
this is PROD issue. That is printing fine with other POs. Only one particular PO is not printing this.
That particular standard text exists.
I can't modify the layout since the problem persists with ' PROD'.
Is there any other tech reasons for skipping text element? because the if condition is TRUE and still debugger control not going further in that element and just it is cmng out.
‎2007 Oct 23 6:32 AM
Ashish,
Tried inserting HARD code 'XXXX' after that IF block. It is NOT printing this text also.
What does it mean IF cond got failed?? or it is just skipping with out checking that condition....if so what cud be the reason??
PRa
‎2007 Oct 23 6:16 AM
change the Condition as follows...
/: IF &EKKO-BSTYP& EQ 'F'.
‎2007 Oct 23 6:24 AM
Hi,
Okay..questions..
1) Check the same form in development system.
2) Check if the window is a MAIN window.
Thanks
Naren
‎2007 Oct 23 6:28 AM
Naren,
checked in DEV box, window is other window only, with name TERMS.
just for information..
if the program don't find enough SPACE will it skip that text element??
PRa
‎2007 Oct 23 6:29 AM
Hi,
check in the development system with a test data..check if the same is working in development
Thanks
Nare
‎2007 Oct 23 6:33 AM
Hi,
Again..I believe the text element will not work for other windows other than main window...
remove the text element and then check...Please try this..
Thanks,
Naren
‎2007 Oct 23 6:38 AM
Naren,
It is working fine in DEV box, it is happening only in PROD and that to one PO only..Even I am getting subrc 0 succesful for write_form FM in PRD.
As it is working fine DEV with no changes, still do u think the probelm is due MAIN window only or any other possible tech reasons?
Thanks,
Pra
Message was edited by:
Praneet
‎2007 Oct 23 6:45 AM
create similar PO in DEV and check if print i comin properly?
‎2007 Oct 23 6:49 AM
Sharayu,
will do that. We take a assumption that, it has printed properly...then do you have any inputs for me to resolve this.
Just i am gathering and checking for all possible case to skip this text element.
PRA
‎2007 Oct 23 7:02 AM
if with the same PO also it works fine in DEV..
check the SAPScript by removing the IF Condition.
‎2007 Oct 23 7:40 AM
Hi Praneet,
Check for the following things in production environment:
1. Standard text is successfully transported to production. Take a print preview of standard text. Standard text needs to be available in the client in which you are executing the transaction.
2. Check in the debugging mode that whether the control is moving to the "IF condition" in the sap-script.
3. At this particular-point what is the value of BSART, there might be a possibility that the value might be changed as a part of coding in particular scenario.
4. Check that the transaction is executed succefully and there is no Abbend message in the update task. i.e. press back or hit enter once the transaction is completed and if it gives any pop-up for the "Update task".
‎2007 Oct 23 9:30 AM
Hi Richa,
Thanks for your inputs.
1. standard text is available in PRD at given client.
2. it is not moving to if condition at all, Just from /E E1 line it self is coming out..I would like when it will happen? how can we check whether this particular got given text or program symbols? FYI - i am getting the status at driver program as subrc 0 success.
3. while at first line /E E1 i checked value of BSART it has the same value.
4. No idea abt UPDATE task, how ever i am able to see the print with blank value for that window.
Please let me know if you any more guidelines to resolve the issue.
PRA
‎2007 Oct 23 11:09 AM
Can we provide restrictions any where in layout / driver program after calling write_form, to not to print the same on print output..??
‎2007 Oct 23 11:14 AM
in your consition use EQ instead of = .. as in SAP Script value is checked as a string... so it may not recognize =.
‎2007 Oct 23 11:29 AM
Sharayu,
thanks for kind reply. My basic Q is only for one PO it is not triggering that text element. However for other POs same condition only we r using..
So how can it will fail for only one PO?
Pra
‎2007 Oct 23 11:38 AM
then Debug the smartform for the PO which is getting printed in proper format.. and for the PO which is not printing properly...
check where the code is behaving differently
‎2020 Jan 16 6:40 AM
Did your issue resolved? please share details.. i struck with the same point. few PO skips the textelements.
‎2020 Jan 16 6:50 AM
Do not re open old topic, your comment will be certainly deleted.
‎2020 Jan 16 8:43 AM