Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a standard LDB program from a Z -report

Former Member
0 Kudos

Hi,

  I need to call a standard program J_3RFPDE which is an LDB program in my z report.I just need the internal table of this standard report for further processing in my z report. I am not able to call this standard report.When i call any other z report or standard report its working fine except this stndard report J_3RFPDE. I have written my code as

In my Z - report.

SUBMIT J_3RFPDE VIA SELECTION-SCREEN

  WITH dd_kunnr-low = dd_kunnr-low

  WITH dd_bukrs-low = dd_bukrs-low

  WITH dd_stida = dd_stida

  AND RETURN.

  IMPORT gt_output TO gt_output1 FROM MEMORY ID 'MY_ID'.

In the standard report i created an implicit enhancement and exported the final table to memory id.

IMPORT gt_output TO MEMORY ID 'MY_ID'.

Kindly suggest me on this issue.

Thanks,

Praveen Raj

22 REPLIES 22

Former Member
0 Kudos

Hi Praveen,

Have you declared Logical Database as DDF in attributes of your Z Program?

Thanks,
Chirdip

0 Kudos

Hi Chirdip,

  Yes i hv declared as DDF in athe attributes of my z program.But still it is not working.

Thnks

0 Kudos

Hi Praveen,

Can you try range table instead if passing for selcion option LOW field..

Build ranges r_kunnr, r_bukrs and r_stida and then call submit.

SUBMIT J_3RFPDE VIA SELECTION-SCREEN

  WITH dd_kunnr IN r_kunnr

  WITH dd_bukrs IN r_bukrs

  WITH dd_stida IN r_stida.

Thanks,
Chirdip

0 Kudos

Mmm... not sure why you need to use logical database in your Z-report.

0 Kudos

I just need the data from the final internal of that LDB program for further processing in my z report.

0 Kudos

Yes, but that does not mean that you need to use logical database in your Z-Report (I mean, to use the LDB in the attributes of your Z-report). I think that from your point of view, if the standard report uses a logical database or not is transparent and that you are not enforced to use it.

davis_raja
Active Participant
0 Kudos

Did you debug and find whether your zreport is calling the standard report.

If the flow is passing into the standard program and you are not getting the values, try with this code.

IF sy-cprog EQ 'ZREPORT'.

  IMPORT gt_output TO MEMORY ID 'MY_ID'.

  EXIT.

ENDIF.

If there is any other issue, please let me know.

0 Kudos

Hi Davisraja pious,

   My report is calling the standard report.The flow is passing to the standard program but the internal table is not getting exported to the memory id i guess.

  I tried ur method,still not working.

Thanks,

0 Kudos

Just do a slight modification in the IMPORT statement and find out whether it is working.

Instead of

IMPORT gt_output TO gt_output1 FROM MEMORY ID 'MY_ID'.

Use

IMPORT gt_output FROM MEMORY ID 'MY_ID'.

0 Kudos

Davisraja pious

I earlier used IMPORT gt_output FROM MEMORY ID 'MY_ID'.It was not working.Later on i changed to IMPORT gt_output TO gt_output1 FROM MEMORY ID 'MY_ID'.

Thnks,

0 Kudos

Did you check the sy-subrc after the IMPORT statement??

Are you using exactly the same datatype for the internal table which you are importing?

former_member191569
Active Participant
0 Kudos

Hello Praveen,

in the standard report you should use EXPORT, not IMPORT. I do not know if it is an error at the time of writing your post but check that you do the pair EXPORT / IMPORT and not two IMPORTS...

David

0 Kudos

David,

Sorry it was typin mistake while writing the post.I have used Export parameter only in the standard report.

Recorrecting my first post as.

EXPORT gt_output to memory id MY_ID'.

0 Kudos

Ok, please while importing make sure that the data types of variables in which you are importing values is same as the data type of variables that were exported.

Are you sure that the export statement are getting executed? It is in an implicitid enhancement, did you checked that execution reaches the EXPORT statement?


0 Kudos

David,

  Yea David you are right,since the implicit enhancement which i created is in the include program just where the internal table is getting populated, the execution is not reaching the export statement.Its skipping that include where i have written the export parameter logic

0 Kudos

This message was moderated.

0 Kudos

Thnx David for the useful information.

  But since its an LDB and the coding is in OOPs i'm not able locate the exact point where i need to implement the implicit enhancement so that the export parameter gets trigered

0 Kudos

Well I think that's a completely new problem.

Try to find the implicit enhancement that you can use to put your custom code. If the code is in ABAP Objects, you can put an implicit enhancement at the end of a method.

If you want, express your thoughts here to try to find an answer or put some code of your program.

David

kiran_k8
Active Contributor
0 Kudos

Praveen,

As the same LDB can be used in different Standard programs,don't we need to check the whereused list of the LDB before you use it as SUBMIT in your Z report.?

Isn't there a need to have a validation in your enhancement that it should be triggerred only for your Z report ?

K.Kiran.

Former Member
0 Kudos

Yes kiran,

   Validation is a must here.I will use sy-tcode = 'Ztcode' in my enhancement area.

Former Member
0 Kudos

Hi Praveen,

Ok so your program J_3RFPDE is getting called but gt_output is not getting exported to memory ID.

Try to write your implicit enhancement at last .. before calling ALV..You may call it here like...

Include - J_3RFPDE_ALV

form call_alv.

  at start of form alv.. export gt_output...

Thanks,

Chirdip


Former Member
0 Kudos

Thnx for all the useful information guyz,

  I got the solution.I just implemented the implicit enhancement in the correct spot to trigger the export parameter.

Thanks

  Praveen Raj