‎2010 Nov 05 5:45 PM
Hello Abap Gurus:
I am creating a smart form for cobra letters, in which i need to display one letter for hourly employees, and other for salaried employees.
For example in my variant if i have two employees one salried and other hourly then my cobra letters should print different letters for salried and hourly employees.
Any suggestions are helpful.
Thanks,
Ratna.
‎2010 Nov 05 5:48 PM
Hi
Check the parameter of smartform interface, here u can indicate which starting page is:
CONTROL_PARAMETERS-STARTPAGE
Max
‎2010 Nov 05 6:06 PM
Thanks for your reply Max:
But my question is i need to control this with in the smart form as there are other letters int eh smart form along with the ones i mentioned in previous post,
So like i have 4 custom letters already in the smart form and i am adding two more letters to it, so the two new letters should display based on whether the employee is hourly or salaried.
Thanks for your time in answering this question.
<removed by moderator>
Thanks,
Ratna.
Edited by: Thomas Zloch on Nov 5, 2010 11:24 PM
‎2010 Nov 05 6:14 PM
Have an identifier in your smartform for the same and based on it decide what page to be called or what is to be displayed. There is command button to call new page on a condition basis.
Nabheet
‎2010 Nov 05 6:16 PM
Hi,
Then in this case I suggest you to set a flag in the Initialization part and based on that flag you can control the pagaes from the printing under Command Section of the page.
Let me know if you face any problem on implemting this.
Regards,
Srinivas
‎2010 Nov 06 1:12 AM
Hi Srini:
i created a g_hrly_slry as a global field and initialized the value of that field in the global initialization and then created a page with a main window in which i tried assigning next page as hrly or slry based on the condition in conditions tab,
but i am not able to run the program. it is ginving me run time error.
Could you please enlighten me the way on how to proceed with this request.
Thanks,
Ratna.
‎2010 Nov 06 1:40 AM
Can you please paste what the dump is...? Secondly based on the flag you can various pages. Other approach islitlle bit complex which is asfollow.
Create only one page and have various windows over it andput conditions on each window based on the flag...i thinkit will work.
But in case all labels are to be printed at once then based on condition in the main window of first page trigger second then based on it in second trigger third and so on.
Nabheet
‎2010 Nov 06 2:13 AM
Hi Madan:
Thanks for your reply. I got rid of the dump now, but i am not able to control the page based on the flag which i set in initialization.
Please let me know what else i can do.
Thanks,
Ratna.
‎2010 Nov 06 1:56 PM
Hi,
I am assuming that before coming to the Smartform you know the Status of the Employee. May be you can get the status from the Smartform Interface Parameters or else set the Variable (Used for comtroling the page printing) in the Driver Program and Import that variable to the Smartform.
Now once 4 letters are printed after the 4th Letter Create a New Page Command and Check the New Page Check and give Page as "5th Letter Page Name" and Under the Condition Tab give your Variable Name with the Set Value.
Similarly follow the same process for 6th Letter.
I suggest to set the Variables Values in Driver Program and IMport this Variable to the Smartform unsing the Form Interface.
Under the Condition Tab V_GROSS_HRLY(Say Identifier) NE ' '. This is will take of Printing the New Pages. I think this logic should work.
Let me know in case if you face any problem on this.
Regards,
Srinivas