Making Subform Behave As Table and Data Part As Body Row
Making Subform Behave As Table and Data Part As Body Row
problems faced:
Whenever the column fields are rearranged randomly into many rows, the data is
displayed in a improper fashion.
In debugging, if we delete any row, and the data that is displayed becomes improper.
Solution: This demo will help us rectify the problem by making the subform behave as table and
the data part as body row.
This is achieved by assigning binding to the subform.
Step1: o to S!" transaction and create interface for the #dobe form.
Step2: "assing the table as import parameters, which will be passed through driver program.
Step3: #ctivate the interface.
Step4: $reate !orm by going to S!" transaction.
Step5: The form contains the conte%t area, which will display the contents of interface. &rag and
drop the table 'IT(S!)I*T' from conte%t area under the folder '+&,-.(S/0!.1-S'.
Step6: &eactivate the fields of the table, which will not be used in the layout, it adds to the
performance.
Step7: o to layout tab, under the layout change the content area adding a static te%t to the top
of master page. 2ame the content area. $lick on the tab body pages.
!or the body page the subform content has to be positioned.
-ove the fields, which you want to view from data view on to the body page individually.
Note: When we try to move the individual fields of the table the binding with the table is affected
and the data that is displayed becomes inconsistent, this demo will help you retain the binding
with the table by making the subform act as a table.
Step8: The field '!)&#T,' can be displayed in different formats as per the re3uirements, which
will be e%plained by below snapshots.
Step9: Select all the fields being displayed on the layout and wrap them in subform.
The #ccessibility of the form should be bodyrow. $reate another subform for e%: Sflight details
and wrap the fields in this subform and give the subform content as positioned and for the
bodyrow subform give the subform contents as flowed. The check bo% 4#llow page breaks within
content4 has to be marked for the data which is being flowed.
Step10: If the data is flowing to multiple pages then we direct the over flown data.
-ove to pagination tab under ob5ect tab, under that if dataset is paginated under overflow give
the name of content area and overflow leader as header row. 0y adding this whenever an
overflow occurs the header will be displayed in all the pages.
We need to create two subforms, the reason is that the body of the table can be flowed to
multiple pages and if we make the subform as flowed all the elements will be aligned either top to
bottom or western te%t 6left to right7. So as we need to display the table contents in two rows we
created two subforms, first one will be flowed and the second one under first one which will be
positioned.
Step11: $reating *eader row for the table.
&rag a static te%t element from the library and drop it above the body row. Wrap the te%t in a
subform giving the accessibility as header row.
Step12: $reating a table subform. The content of the subform should be flowed and the
accessibility should be table.
2ame the untitled subform 6"age 87 as 40odypage84. #fter doing this change the content of the
body page as flowed then click on pagination tab, under that if dataset is paginated under
overflow give the name of content area same as what we performed for body row. 6In body page
we gave overflow leader as header row but in body page pagination do not use that7
Step13: iving borders to the table and header.
Step14: iving bindings to each of the subforms.
Table 0inding: +&,-.(S/0!.1-S9:IT(S!)I*T.
0odyrow 0inding: +&,-.(S/0!.1-S9:IT(S!)I*T9:&#T#. The checkbo% repeat subform for
each data item has to be checked giving -in.$ount ; 8.
Step15: Save and activate the form.
Step16: $reating a &river "rogram which will call the form and on e%ecution will display the
adobe form.
*&---------------------------------------------------------------------*
*& Report yh_demo *
*&---------------------------------------------------------------------*
*&Purpose: Demonstrating driver program to display adobe form *
*&---------------------------------------------------------------------*
REPORT yh_demo
*Data De!larations
D"T" : it_s#ight T$PE s#ight_tab%
D"T" :
&_do!_param T$PE sfpdo!params'(Do! Parameters
&_output_param T$PE sfpoutputparams'
(Output Parameters
result T$PE sfp)oboutput (*oboutput
D"T" :
fm_name T$PE rs+,l_fnam (-un!tion .odule name
* Determine print data' Data &hi!h &ill be displayed on the form
/E0E1T * -RO. s#ight
23TO T"40E it_s#ight
5P TO 67 RO8/
2- sy-subr! 3E 7
E3D2-
* Determine the fun!tion module &hi!h is generated at the runtime for
* the pdf form used
1"00 -531T2O3 9-P_-531T2O3_.OD50E_3".E9
E:PORT23;
i_name < 9$DE.O_/54-OR./9
2.PORT23;
e_fun!name < fm_name
* This fun!tion module is used to spe!ify settings for the form output
* To spe!ify &hether you &ant the form to be printed' ar!hived' or sent
* ba!= to the appli!ation program as a PD-
* The form output is !ontrolled using the parameters >&_ouput_param?
* &ith the type /-PO5TP5TP"R"./
1"00 -531T2O3 9-P_*O4_OPE39
1@"3;23;
ie_outputparams < &_output_param
E:1EPT2O3/
!an!el < %
usage_error < 6
system_error < +
internal_error < A
OT@ER/ < B
2- sy-subr! CD 7
.E//";E 2D sy-msgid T$PE sy-msgty 35.4ER sy-msgno
82T@ sy-msgv% sy-msgv6 sy-msgv+ sy-msgvA
E3D2-
* /et the language Eeld the !omponent of stru!ture F%b!d&bFdo!params
&_do!_param-langu < 9E39
* 1all the fun!tion module and passing the form interfa!e values
1"00 -531T2O3 fm_name
E:PORT23;
F%b!d&bFdo!params < &_do!_param
it_s#ight < it_s#ight
* 2.PORT23;
* F%41D84F-OR.O5TP5T <
E:1EPT2O3/
usage_error < %
system_error < 6
internal_error < +
OT@ER/ < A
2- sy-subr! CD 7
.E//";E 2D sy-msgid T$PE sy-msgty 35.4ER sy-msgno
82T@ sy-msgv% sy-msgv6 sy-msgv+ sy-msgvA
E3D2-
* To !omplete the pro!essing of the form
1"00 -531T2O3 9-P_*O4_10O/E9
* 2.PORT23;
* E_RE/50T < result
E:1EPT2O3/
usage_error < %
system_error < 6
internal_error < +
OT@ER/ < A
2- sy-subr! CD 7
.E//";E 2D sy-msgid T$PE sy-msgty 35.4ER sy-msgno
82T@ sy-msgv% sy-msgv6 sy-msgv+ sy-msgvA
E3D2-
Step17: #ctivating the report and e%ecuting it would pop a window.
ive the device name which is configured for #&S. $lick on "rint "review to see the preview of
the form.
The form output
Page 1:
Page2: