SAP Adobe Interactive Form Tutorial Part VII Printing Address in Adobe Form

SAP Adobe Interactive Form displaying a printed address with form fields

One of our readers left us a question: “I was expecting and am still looking for a way to add an address—customer/vendor—to the Adobe Form using the ADRNR number, similar to how SMARTFORMS handled this. I thought it was managed very well in SMARTFORMS with all the options like country code, postal code, etc. Isn’t there a way to handle this in the Adobe tool as well?” In SAP Adobe Interactive Form Tutorial Part VI Printing Address in Adobe Form,” we will explore how to achieve this in the Adobe tool with similar flexibility.

Our Response: Adobe Structure should be a move up to what we as of now have in SMARTFORMS. Consequently it requirements to acquire the elements of SMARTFORMS. Indeed, Adobe is adequately shrewd to deal with it and we would show you precisely the way that it tends to be accomplished.

Transaction Code: SFP.
Enter the Interface name and Create (Interface is mandatory for Adobe form).

Address in Adobe

Click the short portrayal and Save.

Adobe in SAP

Enter the Bundle name and Save.

Let us add our own custom Parameter Name. Select the Import choice under Structure Connection point (left side) and press the Make button (right side) to add a Bringing in Boundary.

IV_ADDRESS_TYPE TYPE CHAR1
IV_ADDRNUMBER   TYPE AD_ADDRNUM
IV_PERSNUMBER   TYPE AD_PERSNUM
IV_LAND1        TYPE LAND1

Save, Check and Activate the Interface.

Go to back SFP Exchange primary screen. Make the Form.

Press on make button. Give the short portrayal and Connection point name which you have made before.

Enter the Bundle name and Save. Go to Context.

Right snap on the YRAM_ADOBE_FORM7 under the Unique circumstance and make an “Address“.

Double Click on Address and enter the below details.

Save. Go to Layout.

Go to Data View. Drag and Drop the ADDRESS Context.

Increment/Change the size of the Location to account for different lines and eliminate the subtitle.

Save and Activate.

Now, let us go and create the Driver Program.

*&---------------------------------------------------------------------*
*======================================================================*
* YRAM_ADOBE_FORM_PROGRAM7 *
*======================================================================*
* Project : SAP Adobe Forms Tutorial *
* Author : Varad (www.elearningsolutions.co.in) *
* Description : Printing the Address in Adobe form *
*======================================================================*
REPORT yram_adobe_form_program7.

*======================================================================*
* Selection Screen
*======================================================================*
PARAMETERS :
p_atype TYPE char1,
p_adrnr TYPE ad_addrnum,
p_pernr TYPE ad_persnum,
p_land1 TYPE land1.

*======================================================================*
* Data Objects
*======================================================================*

DATA: gv_fm_name TYPE rs38l_fnam, " FM Name
gs_fp_docparams TYPE sfpdocparams,
gs_fp_outputparams TYPE sfpoutputparams.

*======================================================================*
* Constants
*======================================================================*
CONSTANTS : gv_form_name TYPE fpname VALUE 'YRAM_ADOBE_FORM7'.

*======================================================================*
* START of Calling the Form
*======================================================================*
*&---------------------------------------------------------------------*
**&&~~ Form Processing: Call Form - Open
*
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = gs_fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
" Suitable Error Handling
ENDIF.
*&---------------------------------------------------------------------*
**&&~~ Get the Function module name based on Form Name
*
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = gv_form_name
IMPORTING
e_funcname = gv_fm_name.
IF sy-subrc <> 0.
" Suitable Error Handling
ENDIF.

*&---------------------------------------------------------------------*
**&&~~ Take the FM name by executing the form - by using Pattern-
**&&~~ call that FM and replace the FM Name by gv_fm_name
**&&~~ Call the Generated FM
CALL FUNCTION gv_fm_name “ '/1BCDWB/SM00000204'
EXPORTING
/1bcdwb/docparams = gs_fp_docparams
iv_address_type = P_atype
iv_addrnumber = p_adrnr
iv_persnumber = p_pernr
iv_land1 = p_land1
* IMPORTING
* /1BCDWB/FORMOUTPUT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------*
*&---- Close the spool job
CALL FUNCTION 'FP_JOB_CLOSE'
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* <error handling>
ENDIF.

Allow us to test this Adobe improvement to check our Location populated utilizing simply the Location Number.Run Program : YRAM_ADOBE_FORM_PROGRAM7.


Press on Print Preview. Please design your Form better than this. 

This is the confirmation from ADRC (Address) table.

The Location is printed accurately.

I trust that next time you need to print an address in your Adobe form, you’ll know exactly what to do after following the SAP Adobe Interactive Form Tutorial Part VI: Printing Address in Adobe Form. This guide will help streamline the process for you.

YOU MAY BE INTERESTED IN

Best Practices for SAP ABAP Development: A Comprehensive Guide

ABAP Applications for the Cloud: Modernizing for the Future

Future of ABAP on Cloud