| Home • Tips • Tutorials • Sample Specs • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
Email a FriendWhat's New?
Contribute?What's Hot? |
Scenario on displaying logo, background image and fetching data from multiple tablesBy Venkateswara Rao Appikonda, Intelligroup Go to the transaction code SFP. Let us first create an
interface for the form. Say the
name of the interface is ZTABLES.
Chose Create (f5)
and provide the necessary description
for the same.
Save the object either as local object or any package. Double Click on import
in the form interface and choose Create
button over there. Provide the import parameter: PERNR
as shown below.
In
the types, provide the following code:. types: begin of ty_final ,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
ansal like pa0008-ansal,
lga01 like pa0008-lga01,
bet01 like pa0008-bet01,
end of ty_final.
TYPES: it_final type table of ty_final,
itab type table of pa0002 ,
itab1 type table of pa0008 .
Provide the following
code in the initialization . select * from pa0002
into table itab
where pernr = pernr .
select * from pa0008
into table itab1
for all entries in itab
where pernr = itab-pernr .
loop at itab into wa_itab . wa_final-pernr = wa_itab-pernr. wa_final-begda = wa_itab-begda. wa_final-endda = wa_itab-endda . wa_final-vorna = wa_itab-vorna. wa_final-nachn = wa_itab-nachn . read table itab1 into wa_itab1 with key pernr = wa_itab-pernr. wa_final-ansal = wa_itab1-ansal. wa_final-lga01 = wa_itab1-lga01. wa_final-bet01 = wa_itab1-bet01. append wa_final to it_final . endloop.
Define the import and
output parameters as shown above. Declare the following
variables in the global declarations:
Save and Activate it . Now create the form as shown.
Enter the description
and provide the interface name as ZTABLES,
which is created earlier.
Save
the object either as local object or
under a package . Drag the import parameter PERNR and output tables and system fields( if needed) onto the context area
First deactivate
all the fields in the table itab and then select the fields to be visible in
the output (right click on the field and choose activate) as shown below. Repeat
the same for the internal tables itab1 and it_final as well .
Click on layout tab.
Now drag the fields from the data
view to the design view...and arrange them in a specific order in which you want
and create a text element for the header. Here you can change the font and size
for the text element in the right side pane.
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM,
Inc. is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||