Skip to Content
Author's profile photo Shanthi Bhaskar

Get the Data Package Number in Transformation

This many years i came across lot of instances where I need to find what is the package number I am in so that I can place special piece of code for meeting business requirements. In the past i used to do lot of work around to get the package number.

Recently I had same scenario where I need to a Delete operation on my Source Package at First Data package, I debugged entire Generated Transformation program then i identified very simple way of getting the Package number, which is very cool and Simple

Put this code in your in the main code section of the Transformation.

     DATA: LV_DATAPAKID TYPE RSDATAPID.

     CLEAR: LV_DATAPAKID.

*&GettheDatapackagenumber

       LV_DATAPAKID = DATAPACKID.

LV_DATAPAKID will have Data Package Number.

Hope this document will be helpful.

Thanks for Reading,

Shanthi Bhaskar.

Assigned tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Shanthi,  Thank you for the info. We can also use the class: CALL METHOD p_r_request which will populate the datapackage number  .

      Regards,

      Rajesh

      Author's profile photo Shanthi Bhaskar
      Shanthi Bhaskar
      Blog Post Author

      Rajesh,

      Yeah you can get it.. I was using that Class these many years. but recently found this simple approach.

      Thanks,

      SB.

      Author's profile photo Former Member
      Former Member

      Hi SB,

      Thanks for the reply and  regret for  posting this in your blog as i forgot that there will be mutliple solutions to an issue and blog is just one solution for it :-).

      Regards,

      Rajesh