A Complete Tutorial on OData-Based Adobe Forms for SAP Purchase Orders

Estimated read time 21 min read

Introduction:

Adobe Form Development Process for SAP Systems.

The Adobe form development process in SAP typically involves three main steps:

Creating the InterfaceDesigning the FormData Binding

While the overall process remains consistent, the interface creation can vary depending on the data retrieval method. The three primary approaches are:

DDIC (Data Dictionary) based formsXML Schema based formsGateway based forms

Let’s focus on enhancing a gateway-based form using a Purchase Order example:

Approach:

Enhancing a Gateway-Based Purchase Order Form.

In this scenario, we’ll add two additional fields to the standard form:

Bill to AddressAmount in Words

which is discussed in detail in the later steps below:

A. Search for Form in Maintain Form Template App:

Step 1: Locate the standard Purchase Order form.

Access Fiori App “Maintain Form Template”Search for “MM_PUR_PURCHASE_ORDER” under ā€œForm Template Nameā€.Find the template under “Predelivered Template” category.

Step 2: Create a copy of the standard form.

Select “MM_PUR_PURCHASE_ORDER” under “Predelivered Templates”Click on the copy optionEnter a new name for the custom form templateClick OK to create the copy

Step 3: Verify the new custom form

Insert the new form name “ZZ1_HM_TEST” in the “Form Template Name” fieldGo to the “Custom Templates” tabReview the details of the newly created custom form

Step 4: Examine form template details

Click on the form template to open it.Review the detailed information of the custom form.

Step 5: Identify the OData service.

Look for “Data Source” section in the form details.The OData service name “FDP_EF_PURCHASE_ORDER_SRV” will appear for Purchase Order.

Now, as we have created the custom form template ā€œZZ1_HM_TESTā€, we will go for creation of custom OData service to provide the data source to the adobe form which is explained in the next step.

B. Custom OData Service Creation (SEGW):

Step 1: Create OData Service Project

Go to transaction code SEGWCreate a new project named “ZHM_PO_TEST”

Step 2: Redefine Data Model

In project ā€œZHM_PO_TESTā€, Right-click on “Data Model” -> “Redefine” -> “OData Service (SAP GW)”.

Enter technical service name: “FDP_EF_PURCHASE_ORDER_SRV”Specify Version: “0001” and Next.Select all fields and Finish.

Step 3: Generate Runtime Artifacts

Select “Generate Runtime Artifacts”Check the box for “Overwrite Base/Extended Service” and Press Enter

Step 4 : Identify and Add the Custom Fields.

In this requirement, ā€œBill To Addressā€ and ā€œAmount In Wordsā€ are needed to be add, as addition fields in the form apart from the standard details. So, for that we need to check which details are available in the OData Service.

Bill To Address: (Not found in Standard OData Service, but itā€™s a custom field)

Since, Bill to Address is not there in any of the entity in OData service, we will add this, in the structure of Purchase Order Node, i.e., TDS_ME_PO_HEADER.

Amount in Words: (Not found in Standard OData Service, but itā€™s a custom field)

Since, we have the standard field for fetching the Total Amount and now, we just need to convert it in Words. For that we will add the custom field in the structure of Purchase Order Node, i.e., TDS_ME_PO_HEADER.

Step 5: Create Append Structure

Go to transaction SE11Create a new Append Structure named “ZPO_BILL_ADDRESS”

Step 6: Add and Activate Custom Fields

Add the required fields and activate the append structure

Step 7: Import New Properties to Entity

Return to SEGW transactionOpen project “ZHM_TEST”Locate Entity “PurchaseOrderNode”Right-click on “PurchaseOrderNode” -> Select “Import” -> “Properties”

And add additional field in ā€œPurchaseOrderNodeā€, which were added in the structure ā€œTDS_ME_PO_HEADERā€ in the prior step.

Step 8: Update Runtime Artifacts

Expand the “Service Implementation” node.Locate and expand the “Runtime Artifacts” subfolder.Find the class “ZCL_ZHM_PO_TEST_DPC_EXT” in the list.In the class, look for the method “PURCHASEORDER_GET_ENTITY” and redefine it, by right click onĀ  method -> Redefine.

Step 9: Code for fetching Bill to Address and Amount in Words.

Ā 

Ā 

METHOD purchaseorders_get_entity.
TRY.
CALL METHOD super->purchaseorders_get_entity
EXPORTING
iv_entity_name = iv_entity_name
iv_entity_set_name = iv_entity_set_name
iv_source_name = iv_source_name
it_key_tab = it_key_tab
io_request_object = io_request_object
io_tech_request_context = io_tech_request_context
it_navigation_path = it_navigation_path
IMPORTING
er_entity = er_entity
es_response_context = es_response_context.
CATCH /iwbep/cx_mgw_busi_exception.
CATCH /iwbep/cx_mgw_tech_exception.
ENDTRY.

DATA : lv_spell TYPE spell,
lv_amount TYPE p DECIMALS 2,
lv_amt_spell(255) TYPE c.

“Bill To Address
SELECT SINGLE
FROM i_purchaseorder
FIELDS purchaseorder, _purchaseorderitem-plant,
_purchaseorderitem_plant-addressid AS addressid,
_supplier_supplierpurchasingorg-supplierrespsalespersonname AS salesperson
WHERE purchaseorder = @er_entity-ebeln
INTO (ls_data).
IF sy-subrc = 0.
ENDIF.

SELECT SINGLE a~country
FROM i_address
WITH PRIVILEGED ACCESS AS a
JOIN i_supplier
WITH PRIVILEGED ACCESS AS s
ON a~addressid = s~addressid
WHERE s~supplier = @er_entity-lifnr
INTO (lv_country).
IF sy-subrc = 0.
ENDIF.

IF ls_data IS NOT INITIAL AND lv_country IS NOT INITIAL.
cl_fdp_ef_pur_ord_form_utility=>get_address_in_printform(
EXPORTING
iv_language = er_entity-spras
iv_sender_country = lv_country
iv_adrnr = ls_data-addressid
iv_street_has_priority = abap_true
IMPORTING
ev_address_line1 = er_entity-bill_add_line_1
ev_address_line2 = er_entity-bill_add_line_2
ev_address_line3 = er_entity-bill_add_line_3
ev_address_line4 = er_entity-bill_add_line_4
ev_address_line5 = er_entity-bill_add_line_5
ev_address_line6 = er_entity-bill_add_line_6
ev_address_line7 = er_entity-bill_add_line_7
ev_address_line8 = er_entity-bill_add_line_8
).
ENDIF.
“Sales person
er_entity-salesperson = ls_data-salesperson.

“Amount in Words
lv_amount = er_entity-purchaseordernetamount.
CALL FUNCTION ‘SPELL_AMOUNT’
EXPORTING
amount = lv_amount
currency = er_entity-waers
filler = ‘ ‘
language = sy-langu
IMPORTING
in_words = lv_spell
EXCEPTIONS
not_found = 1
too_large = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

IF lv_spell IS NOT INITIAL.
er_entity-zword_amount = lv_spell-word.
ENDIF.

ENDMETHOD.

Ā 

Ā 

Ā Code Explanation:

Call the super class method ā€œPURCHASEORDERS_GET_ENTITYā€ and fetch the existing standard data in ā€œER_ENTITYā€.For Bill to Address logic, select the data from ā€œI_PURCHASEORDERā€ CDS View. As we need country details as well, fetch the data from ā€œI_SUPPLIERā€ and ā€œI_ADDRESSā€ CDS View.Call method ā€œGET_ADDRESS_IN_PRINTFORMā€ of class ā€œCL_FDP_EF_PUR_ORD_FORM_UTILITYā€ to fetch the Bill to Address details.For Amount in Words logic, use FM ā€œSPELL_AMOUNTā€ to get amount in words.

Step 10: Activate the class and service.

Ā 

C. Register the service in GW (T-code – /IWFND/MAINT_SERVICE)

Post creation of OData service, registration of the service will be done by following below steps:

Step 1 : Adding the service in GW.

Click on ā€œAdd Serviceā€ button

Enter System Alias as ā€œLOCALā€, External Service Name as ā€œZHM_PO_TEST_SRVā€ and press Enter.Ā Ā Ā Select the service ā€œZHM_PO_TEST_SRVā€ and click on ā€œAdd Selected Servicesā€ and save the details on the next page.

Now, go back and click on Filter.Provide the service name ā€œZHM_PO_TEST_SRVā€ and search for it. Once you get the service, select and click on execute ā€œSAP Gateway Clientā€ to execute the service if you want to test it.

Now your service is successfully registered.

D. Assign ā€œZHM_PO_TEST_SRVā€ service to Adobe form.

Step 1 : Check the Odata service for form.

Go to T-code SFP -> Check for form ā€œZZ1_HM_TESTā€, created at the beginning (A : step 3) in Maintain Form Template App and click on Display.Standard OData service assigned to it will get displayed.

Step 2 : Changing OData Service.

Enter new custom service ā€œZHM_PO_TEST_SRVā€ in place of standard odata service in form.Save and Activate.

E. Download the bindings for the form

There are two ways to download the bindings for the forms.

Bindings can be downloaded from:

Ā 1) SFP Tcode -> Form -> Utlilites -> Uploading/Downloading -> Downloading Layout (XDP), Downloading Data Schema (XSD).

2) Maintain Form Template App -> Custom Form Name -> Download (it will download both XDP and XSD file in the folder).

Ā 

Since, from ā€œMaintain Form Templateā€ App both the files will be getting downloaded at same time, will opt for this way to download the files. Letā€™s follow this approach with the detail steps explained as below:

Ā 

Step 1 : Download the form.

Go to ā€œMaintain Form Templateā€ app and open the form, will see that the data source got change to our service now ā€œZHM_PO_TEST_SRVā€. Ā Click on Download. Post download, extract the folder ā€œZZ1_HM_TEST_ENā€.

Step 2: Check for XDP and XSD files.

Inside the folder, we will have 2 files, XDP (Layout File) and XSD (Data Schema File) like below which we will be using in next step later.

F. Form Adjustments and New Connection Creation:

There are 2 ways to do form designing and adjustments:

Go to T-code SFP -> Enter Form ā€œZZ1_HM_TESTā€ -> Click on Layout and do the changes.Go to ADLC (Adobe LiveCycle designer) ->
i) Click on Open -> Select XDP File ā€œZZ1_HM_TEST_Eā€ which was downloaded in E: step 2 -> Click Open. (For opening the layout)
ii) Go to Menu -> Window -> Data View -> Check data connection. (Mostly it will appear automatically), if not follow the further steps for creating the data connection.

Ā  Ā  Ā  Ā  Ā Since ADLC way is more convenient, will use that way only for form adjustments.

Step 1 : Layout adjustments.

Go to ADLC. Open the XDP File ā€œZZ1_HM_TEST_Eā€™ and get the standard layout loaded in it.Adjust the standard form, as per the requirement.Add extra fields like ā€œBill to Address, Amount in Wordsā€ etc in the form.

Step 2 : Review Existing Data Connection/ Create New Data Connection.

Go to Window -> Open Data View, check for ā€œData Connectionā€. Generally, the Data Connection comes automatically which can be used for bindings, but, if not, then create new ā€œData Connectionā€ for binding purpose. Follow below steps to create the new Data Connection.

a) Create New Data Connection: Right click on ā€œData Viewā€ and click on ā€œNew Data Connectionā€. Assign name ā€œZHM_PO_TESTā€ and select ā€œXML Schemaā€ and click Next.

b)Ā On the next page -> select the ā€œZZ1_HM_TEST_Eā€ XSD file which we downloaded in the prior step (E : Step – 2) and then on next page click on ā€œEmbed XML Schemaā€ option and finish.

The new connection will appear like this as below:

Save the form.Ā 

G. Data Bindings in form:

Once we have the data connection established in the form, it will have all the data fields in it, which we need to map to the respective fields as explained below:

Step 1 : Data Binding for Custom Fields

All standard fields will have the bindings automatically mapped. So, bindings will be added to additional fields ā€œBill to Address, Amount in wordsā€.

For example : For Bill to Address, follow the below step to do the data binding.

Go to ā€œBill to Addressā€ Text Field -> Binding -> Data Binding -> Select the Data Binding -> ZHM_PO_TEST -> PurchaseOrderNode -> BillAddLine1 and Enter

Do all the bindings like wise and save the form.Upload the form in ā€œMaintain form templateā€ App in our custom form ā€œZHM_TEST_POā€ using upload option and save.

So, finally we are done with all the steps ā€“ creation of form, creation of GW based interface and Data Bindings to the forms. Now, letā€™s test to check the output.

H. Testing the form:

Here, we will go with standard configuration process i.e OPD based (Output Parameter Determination Fiori App) and triggering the form from T-code ā€“ ME23N.

Step 1 : Assign Form Template Configuration.

Go to SPRO -> Cross-Application Components -> Output Control -> Assign Form Templates -> Check for Application Object Type ā€œPURCHASE_ORDERā€ and create new entry with Form Template ID ā€œZZ1_HM_TESTā€ and SAVE.

Step 2 : Output Parameter Determination Configuration.

Go to Fiori App – OPD -> Show Rules ā€œPurchase Orderā€, Determination Step -> ā€œForm Templateā€Ā  and in Decision Table -> Add the Form ā€œZZ1_HM_TEST as below and save:

Step 3 : Testing the form using ME23N.

Go to T-code ME23N -> Insert Purchase Order Number -> Do all the processing -> Click on Message -> The form will get displayed with data

Ā 

Ā 

Ā 

ā€‹Ā Introduction: Adobe Form Development Process for SAP Systems.The Adobe form development process in SAP typically involves three main steps:Creating the InterfaceDesigning the FormData BindingWhile the overall process remains consistent, the interface creation can vary depending on the data retrieval method. The three primary approaches are:DDIC (Data Dictionary) based formsXML Schema based formsGateway based formsLet’s focus on enhancing a gateway-based form using a Purchase Order example:Approach:Enhancing a Gateway-Based Purchase Order Form.In this scenario, we’ll add two additional fields to the standard form:Bill to AddressAmount in Wordswhich is discussed in detail in the later steps below:A. Search for Form in Maintain Form Template App:Step 1: Locate the standard Purchase Order form.Access Fiori App “Maintain Form Template”Search for “MM_PUR_PURCHASE_ORDER” under ā€œForm Template Nameā€.Find the template under “Predelivered Template” category.Step 2: Create a copy of the standard form.Select “MM_PUR_PURCHASE_ORDER” under “Predelivered Templates”Click on the copy optionEnter a new name for the custom form templateClick OK to create the copyStep 3: Verify the new custom formInsert the new form name “ZZ1_HM_TEST” in the “Form Template Name” fieldGo to the “Custom Templates” tabReview the details of the newly created custom formStep 4: Examine form template detailsClick on the form template to open it.Review the detailed information of the custom form.Step 5: Identify the OData service.Look for “Data Source” section in the form details.The OData service name “FDP_EF_PURCHASE_ORDER_SRV” will appear for Purchase Order.Now, as we have created the custom form template ā€œZZ1_HM_TESTā€, we will go for creation of custom OData service to provide the data source to the adobe form which is explained in the next step.B. Custom OData Service Creation (SEGW):Step 1: Create OData Service ProjectGo to transaction code SEGWCreate a new project named “ZHM_PO_TEST”Step 2: Redefine Data ModelIn project ā€œZHM_PO_TESTā€, Right-click on “Data Model” -> “Redefine” -> “OData Service (SAP GW)”.Enter technical service name: “FDP_EF_PURCHASE_ORDER_SRV”Specify Version: “0001” and Next.Select all fields and Finish.Step 3: Generate Runtime ArtifactsSelect “Generate Runtime Artifacts”Check the box for “Overwrite Base/Extended Service” and Press EnterStep 4 : Identify and Add the Custom Fields.In this requirement, ā€œBill To Addressā€ and ā€œAmount In Wordsā€ are needed to be add, as addition fields in the form apart from the standard details. So, for that we need to check which details are available in the OData Service.Bill To Address: (Not found in Standard OData Service, but itā€™s a custom field)Since, Bill to Address is not there in any of the entity in OData service, we will add this, in the structure of Purchase Order Node, i.e., TDS_ME_PO_HEADER.Amount in Words: (Not found in Standard OData Service, but itā€™s a custom field)Since, we have the standard field for fetching the Total Amount and now, we just need to convert it in Words. For that we will add the custom field in the structure of Purchase Order Node, i.e., TDS_ME_PO_HEADER.Step 5: Create Append StructureGo to transaction SE11Create a new Append Structure named “ZPO_BILL_ADDRESS”Step 6: Add and Activate Custom FieldsAdd the required fields and activate the append structureStep 7: Import New Properties to EntityReturn to SEGW transactionOpen project “ZHM_TEST”Locate Entity “PurchaseOrderNode”Right-click on “PurchaseOrderNode” -> Select “Import” -> “Properties”And add additional field in ā€œPurchaseOrderNodeā€, which were added in the structure ā€œTDS_ME_PO_HEADERā€ in the prior step.Step 8: Update Runtime ArtifactsExpand the “Service Implementation” node.Locate and expand the “Runtime Artifacts” subfolder.Find the class “ZCL_ZHM_PO_TEST_DPC_EXT” in the list.In the class, look for the method “PURCHASEORDER_GET_ENTITY” and redefine it, by right click onĀ  method -> Redefine.Step 9: Code for fetching Bill to Address and Amount in Words.Ā Ā  METHOD purchaseorders_get_entity.
TRY.
CALL METHOD super->purchaseorders_get_entity
EXPORTING
iv_entity_name = iv_entity_name
iv_entity_set_name = iv_entity_set_name
iv_source_name = iv_source_name
it_key_tab = it_key_tab
io_request_object = io_request_object
io_tech_request_context = io_tech_request_context
it_navigation_path = it_navigation_path
IMPORTING
er_entity = er_entity
es_response_context = es_response_context.
CATCH /iwbep/cx_mgw_busi_exception.
CATCH /iwbep/cx_mgw_tech_exception.
ENDTRY.

DATA : lv_spell TYPE spell,
lv_amount TYPE p DECIMALS 2,
lv_amt_spell(255) TYPE c.

“Bill To Address
SELECT SINGLE
FROM i_purchaseorder
FIELDS purchaseorder, _purchaseorderitem-plant,
_purchaseorderitem_plant-addressid AS addressid,
_supplier_supplierpurchasingorg-supplierrespsalespersonname AS salesperson
WHERE purchaseorder = @er_entity-ebeln
INTO (ls_data).
IF sy-subrc = 0.
ENDIF.

SELECT SINGLE a~country
FROM i_address
WITH PRIVILEGED ACCESS AS a
JOIN i_supplier
WITH PRIVILEGED ACCESS AS s
ON a~addressid = s~addressid
WHERE s~supplier = @er_entity-lifnr
INTO (lv_country).
IF sy-subrc = 0.
ENDIF.

IF ls_data IS NOT INITIAL AND lv_country IS NOT INITIAL.
cl_fdp_ef_pur_ord_form_utility=>get_address_in_printform(
EXPORTING
iv_language = er_entity-spras
iv_sender_country = lv_country
iv_adrnr = ls_data-addressid
iv_street_has_priority = abap_true
IMPORTING
ev_address_line1 = er_entity-bill_add_line_1
ev_address_line2 = er_entity-bill_add_line_2
ev_address_line3 = er_entity-bill_add_line_3
ev_address_line4 = er_entity-bill_add_line_4
ev_address_line5 = er_entity-bill_add_line_5
ev_address_line6 = er_entity-bill_add_line_6
ev_address_line7 = er_entity-bill_add_line_7
ev_address_line8 = er_entity-bill_add_line_8
).
ENDIF.
“Sales person
er_entity-salesperson = ls_data-salesperson.

“Amount in Words
lv_amount = er_entity-purchaseordernetamount.
CALL FUNCTION ‘SPELL_AMOUNT’
EXPORTING
amount = lv_amount
currency = er_entity-waers
filler = ‘ ‘
language = sy-langu
IMPORTING
in_words = lv_spell
EXCEPTIONS
not_found = 1
too_large = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

IF lv_spell IS NOT INITIAL.
er_entity-zword_amount = lv_spell-word.
ENDIF.

ENDMETHOD.Ā Ā Ā Code Explanation:Call the super class method ā€œPURCHASEORDERS_GET_ENTITYā€ and fetch the existing standard data in ā€œER_ENTITYā€.For Bill to Address logic, select the data from ā€œI_PURCHASEORDERā€ CDS View. As we need country details as well, fetch the data from ā€œI_SUPPLIERā€ and ā€œI_ADDRESSā€ CDS View.Call method ā€œGET_ADDRESS_IN_PRINTFORMā€ of class ā€œCL_FDP_EF_PUR_ORD_FORM_UTILITYā€ to fetch the Bill to Address details.For Amount in Words logic, use FM ā€œSPELL_AMOUNTā€ to get amount in words.Step 10: Activate the class and service.Ā C. Register the service in GW (T-code – /IWFND/MAINT_SERVICE)Post creation of OData service, registration of the service will be done by following below steps:Step 1 : Adding the service in GW.Click on ā€œAdd Serviceā€ buttonEnter System Alias as ā€œLOCALā€, External Service Name as ā€œZHM_PO_TEST_SRVā€ and press Enter.Ā Ā Ā Select the service ā€œZHM_PO_TEST_SRVā€ and click on ā€œAdd Selected Servicesā€ and save the details on the next page.Now, go back and click on Filter.Provide the service name ā€œZHM_PO_TEST_SRVā€ and search for it. Once you get the service, select and click on execute ā€œSAP Gateway Clientā€ to execute the service if you want to test it.Now your service is successfully registered.D. Assign ā€œZHM_PO_TEST_SRVā€ service to Adobe form.Step 1 : Check the Odata service for form.Go to T-code SFP -> Check for form ā€œZZ1_HM_TESTā€, created at the beginning (A : step 3) in Maintain Form Template App and click on Display.Standard OData service assigned to it will get displayed.Step 2 : Changing OData Service.Enter new custom service ā€œZHM_PO_TEST_SRVā€ in place of standard odata service in form.Save and Activate.E. Download the bindings for the formThere are two ways to download the bindings for the forms. Bindings can be downloaded from:Ā 1) SFP Tcode -> Form -> Utlilites -> Uploading/Downloading -> Downloading Layout (XDP), Downloading Data Schema (XSD).2) Maintain Form Template App -> Custom Form Name -> Download (it will download both XDP and XSD file in the folder).Ā Since, from ā€œMaintain Form Templateā€ App both the files will be getting downloaded at same time, will opt for this way to download the files. Letā€™s follow this approach with the detail steps explained as below: Ā Step 1 : Download the form.Go to ā€œMaintain Form Templateā€ app and open the form, will see that the data source got change to our service now ā€œZHM_PO_TEST_SRVā€. Ā Click on Download. Post download, extract the folder ā€œZZ1_HM_TEST_ENā€.Step 2: Check for XDP and XSD files.Inside the folder, we will have 2 files, XDP (Layout File) and XSD (Data Schema File) like below which we will be using in next step later.F. Form Adjustments and New Connection Creation:There are 2 ways to do form designing and adjustments:Go to T-code SFP -> Enter Form ā€œZZ1_HM_TESTā€ -> Click on Layout and do the changes.Go to ADLC (Adobe LiveCycle designer) ->i) Click on Open -> Select XDP File ā€œZZ1_HM_TEST_Eā€ which was downloaded in E: step 2 -> Click Open. (For opening the layout)ii) Go to Menu -> Window -> Data View -> Check data connection. (Mostly it will appear automatically), if not follow the further steps for creating the data connection.Ā  Ā  Ā  Ā  Ā Since ADLC way is more convenient, will use that way only for form adjustments.Step 1 : Layout adjustments.Go to ADLC. Open the XDP File ā€œZZ1_HM_TEST_Eā€™ and get the standard layout loaded in it.Adjust the standard form, as per the requirement.Add extra fields like ā€œBill to Address, Amount in Wordsā€ etc in the form.Step 2 : Review Existing Data Connection/ Create New Data Connection. Go to Window -> Open Data View, check for ā€œData Connectionā€. Generally, the Data Connection comes automatically which can be used for bindings, but, if not, then create new ā€œData Connectionā€ for binding purpose. Follow below steps to create the new Data Connection.a) Create New Data Connection: Right click on ā€œData Viewā€ and click on ā€œNew Data Connectionā€. Assign name ā€œZHM_PO_TESTā€ and select ā€œXML Schemaā€ and click Next.b)Ā On the next page -> select the ā€œZZ1_HM_TEST_Eā€ XSD file which we downloaded in the prior step (E : Step – 2) and then on next page click on ā€œEmbed XML Schemaā€ option and finish.The new connection will appear like this as below: Save the form.Ā G. Data Bindings in form:Once we have the data connection established in the form, it will have all the data fields in it, which we need to map to the respective fields as explained below:Step 1 : Data Binding for Custom FieldsAll standard fields will have the bindings automatically mapped. So, bindings will be added to additional fields ā€œBill to Address, Amount in wordsā€.For example : For Bill to Address, follow the below step to do the data binding.Go to ā€œBill to Addressā€ Text Field -> Binding -> Data Binding -> Select the Data Binding -> ZHM_PO_TEST -> PurchaseOrderNode -> BillAddLine1 and Enter Do all the bindings like wise and save the form.Upload the form in ā€œMaintain form templateā€ App in our custom form ā€œZHM_TEST_POā€ using upload option and save. So, finally we are done with all the steps ā€“ creation of form, creation of GW based interface and Data Bindings to the forms. Now, letā€™s test to check the output.H. Testing the form: Here, we will go with standard configuration process i.e OPD based (Output Parameter Determination Fiori App) and triggering the form from T-code ā€“ ME23N.Step 1 : Assign Form Template Configuration.Go to SPRO -> Cross-Application Components -> Output Control -> Assign Form Templates -> Check for Application Object Type ā€œPURCHASE_ORDERā€ and create new entry with Form Template ID ā€œZZ1_HM_TESTā€ and SAVE.Step 2 : Output Parameter Determination Configuration.Go to Fiori App – OPD -> Show Rules ā€œPurchase Orderā€, Determination Step -> ā€œForm Templateā€Ā  and in Decision Table -> Add the Form ā€œZZ1_HM_TEST as below and save:Step 3 : Testing the form using ME23N.Go to T-code ME23N -> Insert Purchase Order Number -> Do all the processing -> Click on Message -> The form will get displayed with dataĀ Ā Ā Ā Ā Read MoreĀ Technology Blogs by Members articlesĀ 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author

+ There are no comments

Add yours