Skip to Content
Author's profile photo Former Member

How to include headers in an Open Hub Destination

Determine the data source for the Open Hub


Define the Open Hub Destination


In the Destination tab Define the properties for the Open Hub, such as the server and file name, as well as the format


In the Field Definition tab, include the field names for the Open Hub Destination



Create the corresponding Transformation


Map each InfoObject to their corresponding field


It is possible to add regular formulas


Use the End Routine to define the name for the fields in the Open Hub, but consider a counter only for the first line.


Execute the DTP


Once the Data Transfer is complete, the file is generated and it can be viewed through AL11


ABAP Routine

*$*$ begin of routine – insert your code only below this line        *-*

“insert your code here

   DATA: t_rs TYPE TABLE OF _ty_s_TG_1,
          wa_rs TYPE _ty_s_TG_1.

wa_rsaccount =‘ACCOUNT’.
wa_rsflow =‘FLOW’.
wa_rscat_code =‘CAT_CODE’.
wa_rscompany =‘COMPANY’.
wa_rscurrency =‘CURRENCY’.
wa_rsdata_source =‘DATA_SOURCE’.
wa_rsinterco =‘INTERCO’.
wa_rsprofit_center =‘PROFIT_CENTER’.
wa_rsri_code =‘RI_CODE’.
wa_rsscenario =‘SCENARIO’.
wa_rsscope =‘SCOPE’.
wa_rstime =‘TIME’.
wa_rssigneddata =‘SIGNEDDATA’.
wa_rscreatedate =‘CREATEDATE’.

  APPEND wa_rs TO t_rs.
  APPEND wa_rs TO t_rs.

RESULT_PACKAGE[] = t_rs[].

*$*$ end of routine – insert your code only before this line         *-*

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Donnie Burhan
      Donnie Burhan


      In case that the result package is greater than one, then we need to make sure that the header line will only showing on the first data package, and not showing for the subsequent data package:

      If datapackid = '000001'
      //Insert your code here.


      Author's profile photo Lakshmikanth Adharapurapu
      Lakshmikanth Adharapurapu

      Thanks your tip solved my issue ­čÖé

      Author's profile photo Former Member
      Former Member

      Hi Cesar and Donnie,

      Just want to ask some inquiries. Does ZCOUNTER part of the declaration? And error alwasys occur when wa_rs-xxxx is input, there is a syntax error that stating, it should be "wa_rs-" and not ''wa_rs-xx". thank you for your kind help.

      Author's profile photo Jay Roble
      Jay Roble

      I created an ASUG EDW Enhancement Request.

      BW Open Hub Destination - Add Option Create ONE CSV file with header row

      Take a look at it, comment if you wish, there is a detailed attachment with screen shots.

      Vote if you like, Only one vote per company.

      Author's profile photo Gilberto Jose Hernandez Mendoza
      Gilberto Jose Hernandez Mendoza

      How to do with key figures header, can't put string over numeric values?

      Author's profile photo Do Hai Dang Le
      Do Hai Dang Le

      It would do it in a different way.

      For every DSO that need to be exported, I create a Field-based DSO with all fields defined as CHAR, which I call a landing zone for export. Then I will write 1:1 all values of the original DSO to the landing zone DSO and export the value from that to an OpenHub.

      Since all fields are CHAR, you can write anything you want to the fields.

      Author's profile photo SAP BASIS

      It is not working in case of key figures e.g. Quantity with data type Quan and decimal precision 2.

      If you can help how to resolve to populate header for key figures.