Case Study: Adobe Form.: Number On Selection Screen. Based On The Input, The Will Be Printed

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 12

Case Study: Adobe Form.

Business Requirement:

To create a form to print the employee salary details using Adobe Form.

To have a very simple scenario on this, Lets enter employee number on selection screen.
Based on the input ,The employee salary details will be printed.

Solution:
Go to SFP Tcode

First create the interface for the form with name zemp_form.

Author: Nageswar Page 1 03/tt/jjjj


Click on the Create Button.

Provide the Description.

Press Save button .Then we can view the scree like this

Provide the import parameter PERNR as shown bellow.

Author: Nageswar Page 2 03/tt/jjjj


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 .

Author: Nageswar Page 3 03/tt/jjjj


Provide the following code in 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 Input and Output parameters as shown bellow.

Author: Nageswar Page 4 03/tt/jjjj


Declare the following variables in global data as shown bellow.

Save and Activate it.

Author: Nageswar Page 5 03/tt/jjjj


Create the Form as shown bellow.

Enter the description and provide Interface name as ZEMP_FORM which is created earlier.

Press Save button .Then we can view the scree like this.

Author: Nageswar Page 6 03/tt/jjjj


Drag the import parameter PERNR and output tables and system fields(if needed) onto the
context area.

Author: Nageswar Page 7 03/tt/jjjj


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.

Drag and Drop the text box from library on to body pages tab and enter the bellow text.

Author: Nageswar Page 8 03/tt/jjjj


change the font and size for the text element in the right side pane

Author: Nageswar Page 9 03/tt/jjjj


Drag and drop the fields(pernr,date,time,username) from left side data view to under the text field
and arrange like bellow order.

Drag the it_final and drop under user field.

Author: Nageswar Page 10 03/tt/jjjj


Save ,Check and Activate.

Execute it and provide personal number(input).

Choose execute. Give the input device as LP01 or LOCL and choose print preview.

Out Put

Author: Nageswar Page 11 03/tt/jjjj


To call the above Adobe Form in program use the bellow code.

REPORT Zadobeforms .

data:/1BCDWB/FORMOUTPUT type FPFORMOUTPUT ,


/1BCDWB/DOCPARAMS type SFPDOCPARAMS ,
ie_outputparams type SFPOUTPUTPARAMS .

CALL FUNCTION 'FP_JOB_OPEN'


CHANGING
ie_outputparams = ie_outputparams .
.
*here get the function module name from the form

CALL FUNCTION '/1BCDWB/SM00000148'


EXPORTING
/1BCDWB/DOCPARAMS = /1BCDWB/DOCPARAMS
pernr = '00001000'
IMPORTING
/1BCDWB/FORMOUTPUT = /1BCDWB/FORMOUTPUT .

CALL FUNCTION 'FP_JOB_CLOSE' .

Author: Nageswar Page 12 03/tt/jjjj

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy