cancel
Showing results for 
Search instead for 
Did you mean: 

Open Hub Issue.

Former Member
0 Kudos

Hi,

I have requirement where in need to avoid sending the 0 records to the AL11 directory . How can this be achieved?

Reason why i am asking is:

Because when the DTP run , it first goes to start, field and endroutine and then updates directory and then only we know how many records are fetched and filtered after transformation, and we cannot manually intervene when the condition are being checked right?

If dtp fails then only file wont generate, otherwise in all case it will generates what ever records i have .

Thanks for you suggestion.

Regards,

Adhvi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
  • what is your open hub source(OHD)? is it a data target (DSO/cube)?
  • if yes, then is there any logics defined from source to OHD level? or is it a one to one mapping?
  • if it is a one to one mapping then you can write a program to check the count of the source table >0 then raise an event to trigger your open hub DTP

PS: you need to create a process chain only for OHD dtp using the event (event used in the above program).

in this way your OHD will only get triggered when there is a delta/full data but not zero data.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Suhas,

IF  RESULT_PACKAGE IS INITIAL.

raise exception type CX_RSROUT_ABORT.

  ENDIF.

Raising Exception type did not work , this is still writing files to the directory , with 0 Bytes, any alternative ?

Hi Jyothi,

If you have any other solution for this can you help me out with this.

Former Member
0 Kudos

Hi Adhvi,

Raising Exception type did not work , this is still writing files to the directory , with 0 Bytes, any alternative ?

I guess, it might be only a structure file (with the header)?


former_member185132
Active Contributor
0 Kudos

Hi,

OK, the Start/End routines probably don't get fired when there is no data. So the routines are useless when it comes to handling empty data sets.

The only possibility I see is as follows. Let the OHD push the output to a table (not a file on the server). You can make this setting by opening the OHD in change mode. Don't forget to select the 'Deleting data from table' checkbox.

Next, write an ABAP program that reads this table, and generates the output file on the application server only if the table is not empty. The code is relatively simple and should be easily available on SCN.

Finally, your PC should go like this: DTP to load your InfoProvider --> DTP for OHD --> ABAP program.

Regards,

Suhas

Former Member
0 Kudos

Hi Suhar and Jyothi ,

Thank you for the response.

@ Jyothi : Source is DSO and no one to one Mapping , there is filter set in the start routine.So can i write the programme in the end routine . And if i write in the end routine , is it neccessary to raise the event, i do have process chain created for the flow.

@Suhas:  Yes you are correct , i want to ensure that after the transformation happens and 0 records are present , then the File should not be created in the AL11 directory. So can i do this in the end routine?

If  RESULT_PACKAGE is Initial.

RAISE EXCEPTION cx_rsrout_abort.

Endif.

Thank you,

Adhvi


former_member185132
Active Contributor
0 Kudos

Hi,

Yes, that should work.

Regards,

Suhas

former_member185132
Active Contributor
0 Kudos

Hi,

As I understand it, you want to ensure that the file will not be created if the DTP picks up zero records.

If that is your requirement, in your Start/End routine, check how many records exist. If there are zero records, use the command RAISE EXCEPTION cx_rsrout_abort. This will cause the DTP to end and the file will not be written.

Regards,

Suhas