‎2006 Jun 04 6:04 AM
I am adding a new page to the existing standard smartform lb_bil_invoice but I am not able to display the new page.
total i am having 3 pages. 2nd page is in loop, 3rd page newly added it should execute only for particular country (ex. India) since it is invoice the country is the company located or customer country.
Please help me in solving this problem.
Thanks,
Ravi
‎2006 Jun 04 9:12 AM
Hi
I suppose this is your page flow:
1) First Page: next page->Second Page
2) Second Page: next page->Second Page
3) Third Page:
In the Main for Second Page after the loop you should insert a COMMAND NODE for the new-page command: skip to third page from second page if the country is India.
Use the CONDITION TAB to inser the IF CONTROL
Max
‎2006 Jun 04 10:52 AM
max ur assumption is correct can u explain the process in detail please.
since i already informed that i am new to the smartforms and sapscripts.
its appreciated if u can explain me in detail steps.
Thanks,
Ravi
‎2006 Jun 04 11:18 AM
Hi
I suppose you've inserted a LOOP ir TABLE node in MAIN windows, haven't you?
If it's so after and out of the loop insert a COMMAND NODE to manage the break-page.
In this node you have to insert the command to skip to the third page and in the CONDITION TAB of COMMAND NODE you have to insert the control the systems has to to.
The CONDITION tab is a grid: insert the variable (for the country) in the colunm on the left and the value in the colunm on the right.
So place the cursor on the LOOP (or TABLE) node and click on right button of your mouse,
choose Create-Flow Logic->Command
Here in General Attribute set the flag "GO TO NEW PAGE" and insert the name of the third page;
in CONDITION TAB insert the name of variable in FIELD NAME colunm and the value in COMPARISON VALUE colunm.
Max
Max
‎2006 Jun 04 11:54 AM
i had tried this but I am not getting the output, in the spool output i can see that their are 2 pages but only 1 page is displaying but on the header it is diplaying 1 of 2 pages.
please tell me what may be the problem and give the solutions for this.
Thanks,
Ravi
‎2006 Jun 04 12:05 PM
Hi Ravi
This is my e-mail: max_abap4@yahoo.it
send me an hardcopy of the step of your smartform where you've inserted the command node.
Max
‎2006 Jun 06 6:21 PM
Hi Ravi
I've just looked at your smartforms and the defination of command seems to be correct, I've only on doubt:
In the condition tab you've inserted:
DLV_LAND = 'SWITZERLAND'.
But are you sure in the variable DLV_LAND there's the country name? Perhaps there's the code.
Check how you've defined and filled DLV_LAND.
If you do a NEW-PAGE in the MAIN the following windows won't be triggered, so the MAIN should be the last one the sf runs.
Max
Max
‎2006 Jun 07 2:27 AM
Here is the code for the logic.
READ TABLE IS_BIL_INVOICE-HD_ADR INTO GS_HD_ADR
WITH KEY BIL_NUMBER = IS_BIL_INVOICE-HD_GEN-BIL_NUMBER
PARTN_ROLE = IS_NAST-PARVW.
CLEAR WA_KNA1.
SELECT SINGLE * INTO WA_KNA1 FROM KNA1 WHERE ADRNR = GS_HD_ADR-ADDR_NO.
WA_DLV_LAND = WA_KNA1-LAND1.
The variable is diplaying the country name. 'sz'. I changed the condition to WA_DLV_LAND = 'SZ'.
Still it is not working.
please suggest me what to do.
Thanks,
Ravi.