We have previously explored simple layouts and tables individually. In “SAP Adobe Interactive Form Tutorial. Part III. Date Time and Floating Fields, we will delve into essential elements like Date, Time, and various system fields, including Floating Fields (dynamic/changing). While these concepts are fundamental, they remain somewhat elusive until explicitly explained. Let’s embark on this brief journey to uncover these crucial aspects of Interactive Adobe Forms.
Exchange Code: SFP. Trust at this point you have embraced this t-code very much like SAPScript and Smartforms ( and can recall it even in your fantasies).
Make sure to create the interface (which is essential for Adobe forms). Although the tutorial is titled “SAP Adobe Interactive Form Tutorial. Part III. Date Time and Floating Fields,” the interface is the backbone of any interactive Adobe form. The integration of Date Time and Floating Fields is covered extensively in this part to ensure a comprehensive understanding.
Enter the short description and Save.
Enter the Package name and Save.
Let us add our own custom Parameter Name. Select the Import option under Form Interface (left side) and press the Create button (right side) to add an Importing Parameter.
NAME is of type NAME1 (Data Element). Save, Check, Activate the Interface.
Go to back SFP Transaction main screen. Now is the time to create the Form.
Hit Make and give the short depiction and Interface name which you have made previously.
Enter the Package name and Save.
Drag NAME from Connection point to the Context area. Trust you recall that, we made sense of the term Setting in past posts. Basically recollect it as the Worldwide/Top Incorporate whose factors are apparent/accessible to the entire application. If we have any desire to show a few fields in the Adobe from the Connection point, then, at that point, the field must be there in the Setting region.
Intuitive the DATE and TIME fields to Setting. These are framework created factors.
Presently the time has come to play in our Format Region. You can plan your format as perfectly as could be expected and as intricate you need. Be that as it may, for our learning, we will Keep It Basic and Sweet(KISS).
i. A practical example of “How to use a Floating Field in Adobe?”.
Go to Layout
Insert a Standard text field.
Grow/Stretch (as you do in ms paint) the message field limits with the goal that you can compose a sentence in it.
Enter the underneath text or any line you need. In any case, pick single word which you need to keep as drifting field. Drifting means, it very well may be printed anything according to the limiting. It relies upon the runtime worth of the bound variable.
For our model, we maintain that NAME should be dynamic. Select the text (NAME), Right-click on it and pick it as Drifting Field. The word NAME changes to {TextField}.
Do I have to let you that know if you see anything in wavy supports in Adobe Structure, they are Drifting Field?
Bind the drifting field with NAME field which we hauled to the Setting region.
The Field {Text Field} will have dynamic length (most extreme up to bound NAME field from setting). It would extend and gather in size as per your feedback. Name “Smash” is just 3 person, yet name “Wolfeschlegelsteinhausenbergerdorff” has in excess of 30 characters, however your {TextField} would in any case acknowledge it. All things considered, that is the utilization of a Drifting Field.
ii. How to work with Date and Time in Adobe?
Go to Data view:
Intuitive Date and Time fields to Design.
—————————————————————————————–
Ram’s Tip 1: Choosing the right Date/Time Pattern (format).
Select the Date Field and Press on Examples.
You can change the date design, By Choosing the Date Example under the select sort.
You can choose the example in view of country, under Area, by choosing the expected country.
We can likewise organize the Time utilizing similar advances referenced above for the Date field.
Ram’s Tip 2: Know the standard system fields in Adobe.
In Adobe Forms, the beneath are the framework fields accessible.
—————————————————————————————–
Check, Save and Activate.
Stand Alone Test of Adobe Form in T-code SFP:
Press F8 or raise a ruckus around town button on the highest point of your Adobe Structure. Pass your worth to NAME Field.
Press F8 (Execute). Give you neighborhood printer name and hit Print See
You will get your Date, Time and Floater Fields (dynamic runtime esteem) printed.
Allow us to call the Structure from our Driver Program.
Do we need to show the output again? Trust us, it would be precisely as above in the independent test.
Ideally, at this point, you know how to compose a driver program to call your Adobe structure. Do you actually require it? Alright. Check the functioning driver program underneath. Try to appropriately deal with the special cases.
*&---------------------------------------------------------------------*
*======================================================================*
* YRAM_ADOBE_FORM_PROGRAM3 *
*======================================================================*
* Project : SAP Adobe Forms Tutorial *
* Author : Varad (www.elearningsolutions.co.in) *
* Description : Driver Program for Printing Floating Field, Date & Time *
*======================================================================*
REPORT yram_adobe_form_program3.
* Selection Screen
PARAMETERS: p_name TYPE name1.
**&&~~ Data Objects
DATA: gv_fm_name TYPE rs38l_fnam, " FM Name
gs_fp_docparams TYPE sfpdocparams,
gs_fp_outputparams TYPE sfpoutputparams.
CONSTANTS : gv_form_name TYPE fpname VALUE 'YRAM_ADOBE_FORM3'.
*======================================================================*
* 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 execuing 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/SM00000176'
EXPORTING
/1bcdwb/docparams = gs_fp_docparams
name = p_name
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.
This post might seem straightforward, but trust us, if there’s no one to guide you in your team, even finding the Floating Field option in Adobe can be time-consuming. Not to mention configuring the date and time according to the end user’s preferences. Someone needs to show you for the first time, and then you can do it on your own. In “SAP Adobe Interactive Form Tutorial. Part III. Date Time and Floating Fields,“ we’ll cover these aspects in detail.
Thank you kindly for your time!!
YOU MAY BE INTERESTED IN
How to SPLIT Data in FOR LOOP Using Modern ABAP Syntax?
ABAP Evolution: From Monolithic Masterpieces to Agile Architects