Professional Documents
Culture Documents
AT NEW Command in Smartforms PDF
AT NEW Command in Smartforms PDF
(http://w
ww.sap.c
Products
om/) (https://www.sap.com/products.html)
Industries (https://www.sap.com/industries.html)
Support (https://www.sap.com/support.html)
Community (https://www.sap.com/community.html)
Developer (https://www.sap.com/developer.html)
Partner About
(https://www.sap.com/partner.html) About (https://www.sap.com/corporate/en.html)
Home (https://www.sap.com) / Community (https://www.sap.com/community.html) / Archives (/) / Discussions + Actions
Archive (/discussions) / Output Management (/discussions/space/output-management)
Hi all,
I am sending a final table from my report program to smartforms to print the data in table. In that table I had pern
taken a table control and added that table in data->loop. Then my data was printing fine.
https://archive.sap.com/discussions/thread/3273036 1/11
9/5/2018 How to print new table AT NEW command in smartforms
My problem is I want to print the indiviudal tables or one after one employee wise. If one pernr number related re
completed in the first table again for next pernr number I want to start the same new table in the same page by g
each table.
I made selection for "on sort end" for the field pernr. Then an event come under main area. Shall I have to do any
employee wise in separate strips / employees.
Regards,
Praveen Chitturi.
Former Member
November 29, 2012 at 22:04 PM
0 Likes
https://archive.sap.com/discussions/thread/3273036 2/11
9/5/2018 How to print new table AT NEW command in smartforms
Correct Answer
end of it_pernr.
loop at it_data.
it_pernr-pernr = it_data-pernr.
collect it_pernr.
clear it_pernr.
endloop.
0
View this answer in context (/discussions/message/13689084#13689084)
Not what you were looking for? View more on this topic (https://go.sap.com/community/tag.html
id=334558737810127171897316045257708) or
https://archive.sap.com/discussions/thread/3273036 3/11
9/5/2018 How to print new table AT NEW command in smartforms
15 replies
hi,
you must bring this logic inside the program and bring every values in the individual
internal tables and pass those into smartforms.
From my program I can send only one final internal table to form. It may contain single
or multiple pernr details based on the selection made. So in that case how can i
handle this ?
hi,
Vinoth Aruldass
Hi,
Sort the internal table by pernr before sending to the smartform function module. In
smartform in each loop pass check whether pernr is changed with the old value of
pernr. based on this you can put breaks.
thanks.
Hi aswath,
I had sorted the table and put the after sort end event then one default event was
triggered and appearing in after the main area of table. What can i mention there in
that event?
Hi,
using a variable, Put the old value of pernr in that variable and check it with new value
or pernr in the loop. Now when the value changes trigger the break. This will not be
applicable for the first time of the loop since there is no old value of pernr so use a flag
to control for the first times loop pass.
thanks.
(https://people.sap.com/rosenberg.eitan)
Hi,
https://archive.sap.com/discussions/thread/3273036 5/11
9/5/2018 How to print new table AT NEW command in smartforms
Yes Eitan,
(https://people.sap.com/rosenberg.eitan)
In your program:
https://archive.sap.com/discussions/thread/3273036 6/11
9/5/2018 How to print new table AT NEW command in smartforms
FORM get_data_1
CHANGING
FROM sflight
UP TO p_maxsel ROWS
WHERE
fldate IN s_fldate .
<it_sflight>-paymentsum = 0 .
st_scarr-carrid = <it_sflight>-carrid .
ENDLOOP .
FROM scarr
WHERE
carrid EQ <st_scarr>-carrid .
ENDLOOP .
ENDFORM. "get_data_1
*---------------------------
In your form:
https://archive.sap.com/discussions/thread/3273036 8/11
9/5/2018 How to print new table AT NEW command in smartforms
Hi Aswatha Narayana
My understanding of requirement is you have a table with some records and you want
to break at end of the key field and display it in the different boxes.
I tried to attche the document but it is taking lot of time if you can send your mail id i
will send it to you MY id G.sreekanthgoud@gmail.com
(mailto:G.sreekanthgoud@gmail.com)
https://archive.sap.com/discussions/thread/3273036 9/11
9/5/2018 How to print new table AT NEW command in smartforms
Hi Sreekanth,
thanks for your concern. I understood it now after seeing the Image above......
Hi Praveen, you can achieve this in the way @Basar Ozgur Kahraman
(https://people.sap.com/basarozgur.kahraman) mentioned.
thanks.
Correct Answer
(https://people.sap.com/basarozgur.kahraman)
Hi Chitturi,
end of it_pernr.
loop at it_data.
it_pernr-pernr = it_data-pernr.
collect it_pernr.
clear it_pernr.
endloop.
https://archive.sap.com/discussions/thread/3273036 10/11
9/5/2018 How to print new table AT NEW command in smartforms
(https://people.sap.com/rosenberg.eitan)
Hi Basar .
Then I passed the tables as parameters to the form. Much easier to debug
Hi basar,
Actually I am filling the final internal table (it_final) and sending this final internal table
to smartform table. There I kept a table control and printing the data.
Share & Follow
So the code what you mentioned where I have to declare and what it will does?
(https://www.facebook.com/sapcommunity) (https://twitter.com/SAPCommunity)
Please kindly take some patience for (https://www.linkedin.com/company/sap)
(https://www.youtube.com/c/SAPCommunities)
me. Thanks in advance boss.
Regards,
(https://plus.google.com/+SAPCommunities) (https://instagram.com/sap/) (http://www.slideshare.net/SAP)
Praveen chitturi.
Privacy (http://go.sap.com/about/legal/privacy.html) Terms of Use (http://go.sap.com/corporate/en/legal/terms-of-use.html)
Legal Disclosure (http://go.sap.com/about/legal/impressum.html)
0 Copyright (http://go.sap.com/about/legal/copyright.html)
Trademark (http://go.sap.com/about/legal/trademark.html) Cookie Preferences
Sitemap (http://www.sap.com/sitemap/index.html) Newsletter (https://go.sap.com/registration/newsletter.html)
https://archive.sap.com/discussions/thread/3273036 11/11