SAP Virtual/Onsite Trainings

Document Categories:

What's New?


Sample Specs

What's Hot?

Web Dynpro for ABAP Tutorials 

Join the Mailing List
Enter name and email address below:
Subscribe  Unsubscribe 

Demo on Dynamic Mapping using Field Symbol


Let’s see the code in subroutine dynamic mapping now.

Here we will loop on the table and then will read the value in given structure (say wa_copy1) and then check if the value in destination structure (wa_mara) contains the values for same field or not. If not, then it will get copied else continue to next iteration.

Similarly, for second structure wa_copy2 it will work. Important point to be noted here is it won’t map (copy) the value if it has already got copied from initial structure wa_copy1.

3) Finally, let’s execute the report and see the logic in debugging in order to understand it better.

Click on Execute and following screen will come as we have set debugger.

We can see that structures wa_copy1 and wa_copy2 now contains the data. This is the scenario we want for creating a demo on dynamic mapping.

Now, we want to map the fields from these two structures into one structure wa_mara. This can be achieved using field symbols as shown in coding.

This is very simple example and created for showing the demo on dynamic mapping using field symbol. However, in complex scenarios it will be very useful code. Users are requested to make the necessary changes based on their requirement.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image