Determine the data source for the Open Hub

/wp-content/uploads/2014/05/openhubheader01_452254.png

Define the Open Hub Destination

/wp-content/uploads/2014/05/openhubheader02_452291.png

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

/wp-content/uploads/2014/05/openhubheader03_452292.png

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

/wp-content/uploads/2014/05/openhubheader04_452293.png

 

Create the corresponding Transformation

/wp-content/uploads/2014/05/openhubheader05_452294.png

Map each InfoObject to their corresponding field

/wp-content/uploads/2014/05/openhubheader06_452295.png

It is possible to add regular formulas

/wp-content/uploads/2014/05/openhubheader07_452296.png

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

/wp-content/uploads/2014/05/openhubheader08_452297.png

Execute the DTP

/wp-content/uploads/2014/05/openhubheader09_452298.png

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

/wp-content/uploads/2014/05/openhubheader10_452299.png

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’.

ZCOUNTER = ZCOUNTER + 1.
IF ZCOUNTER = 1.
  APPEND wa_rs TO t_rs.
ENDIF.
LOOP AT RESULT_PACKAGE INTO wa_rs.
  APPEND wa_rs TO t_rs.
  DELETE RESULT_PACKAGE.
ENDLOOP.

RESULT_PACKAGE[] = t_rs[].

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

To report this post you need to login first.

2 Comments

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

  1. Donnie Burhan

    Hi,

    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.
    
    Endif.

     

    (0) 
  2. Ethan Menace

    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.

    (0) 

Leave a Reply