0% found this document useful (0 votes)
183 views

Part 6 - Using Extension Fields in Migration Objects - SAP Blogs

Uploaded by

peen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
183 views

Part 6 - Using Extension Fields in Migration Objects - SAP Blogs

Uploaded by

peen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

02.12.

2020 Using extension fields in migration objects | SAP Blogs

Community

Ask a Question Write a Blog Post Login

Product Information

Udo Matthias Sommer


November 5, 2018 4 minute read

Using extension elds in migration objects


Follow RSS feed Like

2 Likes 3,374 Views 3 Comments

In this blog I explain how to extend migration objects and provide data to the extension structure of BAPIs.

Scenario
Some BAPIs support extension for customer added elds by table parameters EXTENSIONIN and
EXTENSIONOUT in their interface.

In my example I will extend the migration object EQUIPMENT and provide ETM data (Equipment and Tools
Management) for the append structures J_3GEQUIA and J_3GEQUZA via EXTERNSIONIN to the function
module BAPI_EQUI_CREATE.

The interface of this BAPI has the extension elds:

https://blogs.sap.com/2018/11/05/using-extension-fields-in-migration-objects/ 1/9
02.12.2020 Using extension fields in migration objects | SAP Blogs

The parameters are de ned like structure BAPIPAREX:

So, you have to provide the name of a structure in eld STRUCTURE and the data of all elds of the
structure in the elds VALUEPART1, hence the structure must only contain character-like elds:

If you want to read more on the extension concept, you could read
https://blogs.sap.com/2014/06/24/bapi-extension-for-customer-added- elds/.

Prerequisites
This blog is based on S/4HANA 1709 FPS2 and should be valid for higher versions as well.

Update on Nov 14 2018

The creation of additional source structures was introduced in LTMOM with S/4HANA 1610 FPS2,
hence, this approach does not work in older versions.
(For versions between 1610 FPS2 to 1709 FPS1 I can’t tell if it works or not.)

I performed the necessary steps for a le upload project and a staging project. The screenshots are taken
from the le-based project.

The BAPI itself does not process the data in the extension elds but a BADI implementation is required. In
case of BAPI BAPI_EQUI_CREATE the BADI BADI_EAM_ITOB_BAPI_CUST_FIELDS must be implemented
which is not part of this blog.

Extending the Object in Migration Object Modeler


In Migration Cockpit the object EQUIPMENT only has one source structure EQUI as you can see in the view
Source Structures in Migration Object Modeler (transaction LTMOM):

https://blogs.sap.com/2018/11/05/using-extension-fields-in-migration-objects/ 2/9
02.12.2020 Using extension fields in migration objects | SAP Blogs

Remark

I prefer the technical view which displays the names of elds and structures instead of the descriptions.
The view can be switched in the menu Settings à Technical Names On/O .

The target structure EXTENSIONIN of the BAPI is a table; hence we must add a new source structure below
the source structure S_EQUI. The structure EXTENSIONOUT is not required for my example.

Switch to change mode, then right-click on S_EQUI, select Append Structure to Lower Level:

Enter name and description of the additional structure and con rm. I name the structure S_EXTENSIONIN
and use description “Extension Fields”:

https://blogs.sap.com/2018/11/05/using-extension-fields-in-migration-objects/ 3/9
02.12.2020 Using extension fields in migration objects | SAP Blogs

Now add the required elds:

Remark

Field EQUNR is necessary for the migration cockpit to link the entries in this structure to the
equipments in the upper level structure.

The other elds are entered as they are de ned in structure EXTENSIONIN of the function module.

Now we need to link the structure to the parent structure S_EQUI by foreign key relationship:

Enter EQUNR in the rst line and leave the second line initial:

Con rm and save the changes.

In Target Structures we don’t have to change anything.

https://blogs.sap.com/2018/11/05/using-extension-fields-in-migration-objects/ 4/9
02.12.2020 Using extension fields in migration objects | SAP Blogs

In Structure Mapping we need to map our new structure S_EXTENSIONIN to the structure EXTENSIONIN by
drag and drop:

Save the changes.

In Field Mapping we need to map the elds of the source structure to the corresponding elds in the target
structure by drag and drop:

https://blogs.sap.com/2018/11/05/using-extension-fields-in-migration-objects/ 5/9
02.12.2020 Using extension fields in migration objects | SAP Blogs

The eld EQUNR is only needed for the link to the structure S_EQUI, so we do not map it to the target
structure.

Save the changes.

Generate the object:

https://blogs.sap.com/2018/11/05/using-extension-fields-in-migration-objects/ 6/9
02.12.2020 Using extension fields in migration objects | SAP Blogs

Testing the object

Now you can jump to Migration Cockpit (transaction LTMC) and test your extension:

After you downloaded the new xml template you see a new sheet Extension Fields; the screenshots show
some sample data:

Here you ll the equipment number and the name of the extension structure and its values.

Debugging the migration object according to note 2630183 shows that the values are correctly passed to
the BAPI:

https://blogs.sap.com/2018/11/05/using-extension-fields-in-migration-objects/ 7/9
02.12.2020 Using extension fields in migration objects | SAP Blogs

Alert Moderator

Assigned tags

SAP S/4HANA migration cockpit |

Related Blog Posts

Data Migration Cockpit (DMC)


By Ravi Bajaj , Oct 14, 2019

Migration Cockpit Enhancement for Missing Migration Objects using BAPI


By Ravi Yadav , Jul 19, 2019

How to migrate materials with user elds using the Migration Cockpit
By Alexey Danshin , Oct 21, 2019
Content of EXTENSIONIN structure:

Related Questions

How to add DMS Document in Inspection Method Migration Cockpit Object - SIF_INSP_METHOD
By Pratik Ghosh , Apr 30, 2019

SAP S/ 4HANA (1909) Fashion and Vertical Business system objects


By Tai Lu , Dec 23, 2019
The BAPICockpit
Migration is called pertosingle
- 1709 1909 equipment, hence the table EXTENSIONIN now only contains the two lines for
the
By Jerst equipment
rey in my
Reed , Apr 20, upload le.
2020

The processing of the data in the BAPI is not described in this blog, as mentioned above; if you need
information please look at note 2146575 Customer elds in BAPIs: Technical object.

3 Comments

You must be Logged on to comment or reply to a post.

Michelle Crapo

November 6, 2018 at 1:53 pm

I’m glad this blog has been written now. I could have used it a few months ago. But I’m sure others will be
happy to use this guide. As always I appreciate the pictures. It takes a bit more work to include them.

Like(1)

https://blogs.sap.com/2018/11/05/using-extension-fields-in-migration-objects/ 8/9
02.12.2020 Using extension fields in migration objects | SAP Blogs

Luis Urbina

March 29, 2019 at 9:30 pm

Hello Udo.

Thanks for the information! It’s a great guide.

Now, about using staging tables. Say I added extended elds copying the objects to z versions. Then all I
have to do is create the project using these objects with the staging tables option and the tables created will
have the extended elds? Or do I need to go throug other steps?

Thanks for your help.

Luis.

Like(0)

Udo Sommer | Post author

April 1, 2019 at 8:03 am

Hello Luis,

There aren’t any additional steps, you only need to copy the enhanced object to the staging project and then
the staging tables are created accordingly.

Regards,

Udo

Like(1)

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Настройки параметра cookie

Newsletter Support

https://blogs.sap.com/2018/11/05/using-extension-fields-in-migration-objects/ 9/9

You might also like