Application Development and Automation 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: 
Read only

Export & Import to memory id Problem in ECC 6.0

Former Member
0 Likes
11,576

Hi Expert,

            When I use export & import is ECC 6.0 is not working...But working fine in 4.7

Thanks

Shree

hi,

    When you want your report_a program to execute.. whether you are only guy gonna use or what?

if you are the only one means.. include sy-uname also in that condition.

    Data: lv_report type sy-repid value ‘report_b'      

       If  sy-repid = lv_report and sy-uname = 'you'.

         leave program.

       endif.

try like this..

this may help you..

thanks,

Mathan R.

77 REPLIES 77
Read only

0 Likes
5,806

Hi Mathan,

    We need to create T-code for both program and to be sent End-Users..They would be accessing frequently..That's why report_b should run without any problem.  Report_A runs separately with taking it_final of b report...

Thanks

shree

Read only

0 Likes
5,806

Hi Mathan,

             Can you send any Flag from submit? So then we can condition if based on the flag report_a has run & leave program.

thanks

shree

Read only

0 Likes
5,806

Hi Mathan,

             Can we send any Flag value from submit option from report_a? So then we can condition if based on the flag report_a has run & leave program.

thanks

shree

Read only

0 Likes
5,806

hi,

    First of all what is the necessary to write this code..

you are coming from report_a and displaying somethin in report_b, using the above mentioned way..

i think no need to use this.. it ll automatically come to your program if you used

Submit XXXX and returen means..

if im wrong with the requirement means, please let me know..

hope this helps,

Mathan R.

Read only

0 Likes
5,806

Hi Mathan,

         You are not understanding..if you run report_b..it leave without output..because we kept the logic LEAVE PROGRAM.  before fieldcatlog & resuse_alv_grid_display.....so report_b won't get result..

Note: if you keep the logic after resuse_alv_grid_display...it gets dump error so report_a won't get data..that's why i need to keep the logic only before field_catlog..I can't edit the report_b too much.

any clarification let me know..

thanks

Shree

Read only

0 Likes
5,806

Hi,

I kept the logic LEAVE PROGRAM before build_fieldcat & resuse_grid_display in report_b. that's why whenever any user runs report_b it won't get reuslt.

Condition:  The LEAVE PROGRAM logic should be kept before build_fieldcat to avoid dump.. I’m getting it_final data using export & import

One more thing, we can't keep logic after resuse_grid_display...it gets dump when we run SUBMIT technique FROM REPORT_A.

Thanks

shreee

Read only

0 Likes
5,806

Eg:    Report_B –

You will understand now report_b will not get output cause the LEAVE PROGRAM LOGIC.

So I need logic without disturb report_b…

    Start-of-selection

       Perform get_data.

       Perform build_cat.

       Perform alv_display.

         Form get_data.

*------written code like this works find

          If  sy-tcode = ‘ztcode’. --------Tcode of report_a

          EXPORT  it_final to memory id ‘MEM’.

            Leave program.

            Endform.

           Form build_cat.

            Endform.

           Form alv_display.

            Endform.

Read only

0 Likes
5,806

Hi Shree,

Form get_data.

You can check if sy-cprog = report A. means calling program (program B is called by program A) OR

          If  sy-tcode = ‘ztcode’. --------Tcode of report_a

          EXPORT  it_final to memory id ‘MEM’.

           EXIT.

          endif.

         Endform.

but Submit Program B in report A should contain word RETURN.

Kindly let me know your feedback

Thanks & Regards,

Vignesh Yeran

Read only

0 Likes
5,806

hi,

    Start-of-selection.

       Perform get_data.

         Form get_data.

     If  sy-tcode = ‘ztcode’. --------Tcode of report_a

          EXPORT  it_final to memory id ‘MEM’.

          EXIT.

     endif.

       Perform build_cat.

       Perform alv_display.

       Endform.

           Form build_cat.

            Endform.

           Form alv_display.

            Endform.

try like this.

thanks,

Mathan R.

Read only

0 Likes
5,806

Hi Vignesh,

      when i access t-code of report_a..it_final is filling but when i access report_a directly it_final is not filling...

Thanks

Shree

Read only

0 Likes
5,806

Hi Vignesh,

      t-code level is working...... Report level is not working..I always need to access report_a..

thanks

shree

Read only

0 Likes
5,806

Hi Vignesh,

              What it means the sy-cprog condition is not satisfying... When access SE38 then report_a the condition has to satisfy then it_final would be filled..

Thanks

shree

Read only

0 Likes
5,806

Hi Vignesh,

      Accessing report_a through se38 then the EXIT COMMAND IS NOT WORKING.. THAT'S THE PROBLEM..if EXIT is working it_final would be filled..

Thanks

Shree

Read only

0 Likes
5,806

Hi Shree,

When you access Report_A from SE38 when u execute it will call Report B by statement SUBMIT.

then in REPORT B after processing fill it_final and export to some memory Id which will be imported in Report A right?

So sy-cprog you can check whether it is equal to Report_A inside Report_B after Export statement.

Hope this helps you.

If my understanding is incorrect, I request you to explain the problem in detail again.
Thanks for your co-operation.

Regards,

Vignesh Yeram

Read only

0 Likes
5,806

Hi Vignesh,

     if you could read my post you would understand...

Thanks

Shree

Read only

0 Likes
5,806

Hi,

       sy-cprog is equal to repor_a that's right & not filling it_final table....if you access through t-code it's works fine.

se38 level execution works if you keep logic without anything

export it_final to memory id ''mem'

  leave program

but report_b won't work..

Thanks

shree

Read only

0 Likes
5,806

Dear Shree,

You can declare a parameter in selection screen of report_b.

parameter : p_call_b TYPE char1 NO-DISPLAY.

And when you call report_b from report_a by SUBMIT also use the above parameter p_call_b passing 'X'.

You can check p_call_b in report B, then Export itab then exit or leave program.

This is a little change by declaring the parameter in selection screen will not affect any functionality, this should solve your problem.

Kindly let me know your feedback.

Thanks & Regards,

Vignesh Yeram

Read only

0 Likes
5,806

Hi Vigesh,

   It's good idea...we also need to check t-code..

  if t-code = 'repor_a' or p_cal_b = 'X'.

    export it_final to memory id.

endif.

Thanks

Shree

Read only

0 Likes
5,806

Hi Vignesh,

              the submit is not allowing this parameter. to call zreport_b.but it's good idea..

SUBMIT zrepor_b USING SELECTION-SCREEN 1000
                         
WITH a IN a  selection parameter

                                                     WITH b IN b  selection parameter

                                                      WITH p_call_b IN p_call_b
EXPORTING LIST TO MEMORY AND RETURN.

IMPORT it_final FROM MEMORY ID ''key''

Thanks

shree

.


Read only

0 Likes
5,806

Dear Shree,

Please dont declare p_call_b as select_option.

It should be parameter: p_call_b type char1.

SUBMIT zreport_b  USING SELECTION-SCREEN 1000

                                WITH s_para1 IN s_para1     

                                WITH s_para2 IN s_para2    

                                WITH s_date IN s_date.

                                with   p_call_b = 'X'                     "Please not this line

                    EXPORTING LIST TO MEMORY AND RETURN

Kindly indicate or reward as helpful or correct answer.

Thanks & Regards,

Vignesh Yeram

Read only

0 Likes
5,806

Hey Vignesh Yeram can you help with my query which I post

Read only

0 Likes
5,806

Hi Vignesh,

               Sure i let you know cause server down...

thanks

Shree

Read only

0 Likes
5,806

Dear Ashwini,

Sure i'll help you where have u posted your query and which thread?

Thanks & Regards,

Vignesh Yeram

Read only

0 Likes
5,806

i have posted my query in abap development

Read only

0 Likes
5,806

Dear Ashwini,

I am not able to find, could you please paste the link.

Thanks & Regards,

Vignesh Yeram

Read only

0 Likes
5,806

This message was moderated.

Read only

0 Likes
5,806

In report_b check value of sy-calld (*) if set (called by SUBMIT AND RETURN) then export to memory and leave, else display data.

Regards,

Raymond

(*) Read ABAP System Fields, and also Content of the system field sy-calld for release 6.10.

Read only

0 Likes
5,806

Hi Vignesh,

      Sorry for delay reply, i went vocation... I checked its working fine when the line comes in b program p_call_b 

When in report_b having data in it_final.  but after come back report a..no data in it_final.

regards

Shree

Read only

0 Likes
5,806

hey Vignesh,

       Now report B is not working..it returns when i execute..

Thanks

shree

Read only

0 Likes
5,806

Dear Shree,

It_final should be exported from programB and imported in Program A.

Thanks & Regards,

Vignesh Yeram

Read only

0 Likes
5,806

Hi Vignesh,

        it's working fine report_a wise but when i run report_b separately which returns back not able execute..

following code interrupts report_b....

IF sy-tcode = 'Ztcode-a or sy-calld = 'X'.
     EXPORT it_final TO MEMORY ID key
     LEAVE PROGRAM.
   ENDIF.

thanks

Shree

Read only

0 Likes
5,806

Hi Vignesh,

         I have done following method but report_a is working fine.. but when we execute report_b alone it's not working due to following method..

Now report_a is working fine both tcode & reportwise..

IF sy-tcode = 'Ztcode-a or p_call_b = 'X'.
     EXPORT it_final TO MEMORY ID key
     LEAVE PROGRAM.
   ENDIF

Tell me solution for report-b to work well.

Thanks

Shree


Read only

0 Likes
5,806

Dear Shree,

You can display data or watever you want to do in else part of IF condition.

IF sy-tcode = 'Ztcode-a or p_call_b = 'X'.
     EXPORT it_final TO MEMORY ID key
     LEAVE PROGRAM.

else.

"display data  or watever you want to do.

ENDIF.

Thanks & Regards,

Vignesh Yeram

Read only

0 Likes
5,806

Dear Vignesh,

      When you execute report-b alone the parameter would be called p_call_b = 'X'. then report_b returns without output.

My requirement is not to disturb report-b..

after ELSE report-b's fieldcatalog available and reuse_alv_grid_display..that's why it returns

Thanks

shree

  

Read only

0 Likes
5,806

Dear Shree,

p_call_b will not be displayed in selection screen of Report B.

Its should be declared as: data: p_call_b type char1 NO-DISPLAY.

So when you execute the report B this parameter will not be shown and will be executed with p_call_b = blank.

Hope this helps you.

Thanks & Regards,

Vignesh Yeram

Read only

0 Likes
5,806

Hi Vignesh,

       Data declaration is not accepting to declare. Specially when declare like data: p_call_b type char1 NO-DISPLAY.

No-display getting red mark...

Suggest me any good idea.

thanks

Shree

Read only

0 Likes
5,806

Hi Shree,

sorry it should be declared as parameter in selection screen of report B.

parameters: p_call_b type char1 NO-DISPLAY.

Thanks & Regards,

Vignesh Yeram

Read only

0 Likes
5,806

Hi Vignesh,

        Sorry Vignesh....It won't allow Report_b to execute & get result.

According you Report_A is working in both way SE38 & T-code level

What happens if you write below code..When you execute Report_b comes out without output.. Pl you test let me know..          

  IF sy-tcode = tocde OR p_call_b = 'X'.
     EXPORT gt_final TO MEMORY ID TD.

     Leave program.
   ENDIF.

Thanks

Shree