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 Memory ID problem in OOAlv Report ?

Former Member
0 Likes
656

My requirement is ..develop an ALV report with invoice no (vbrk) ,, when ever user double click on invoice no....a smart form is processed for that Invoice no ..

-


For this....

I developed an Invoice ALV Report with Object Oriented Technology....and I need to export Invoice Number to Smartform program when ever user double clicks on Invoice number , i implemented a method to handle double click

METHOD : HANDLE_DOUBLE_CLICK .

READ TABLE I_VBRK INTO WA_VBRK INDEX E_ROW-INDEX .

LV_VBELN = WA_VBRK-VBELN .

EXPORT LV_VBELN FROM WA_VBRK TO MEMORY ID 'INVOICE'.

SUBMIT ZINVOICE_DP .

ENDMETHOD .

And Trying to import the Invoice number as

DATA : LV_VBELN TYPE VBRK-VBELN .

IMPORT LV_VBELN FROM MEMORY ID 'INVOICE' .

SELECT SINGLE * FROM VBRK

INTO WA_VBRK

WHERE VBELN = LV_VBELN .

I debugged the program so meny times but unable to find what the exact problem is ?? exporting is successful and unable to import in in smartform.

Please Give me the Solution or suggest me the alternative for this

3 REPLIES 3
Read only

naimesh_patel
Active Contributor
0 Likes
569

Make sure you are exporting and importing in the same TYPE variables.

If you want to get rid of the EXPORT / IMPORT, you should use the Selection screen parameter to pass the value from your ALV to Submitted program. Make sure you have an selection screen in your ZINVOICE_DP. You can use SUBMIT with addition to pass the value from ALV to submitted program.


METHOD : HANDLE_DOUBLE_CLICK .
  READ TABLE I_VBRK INTO WA_VBRK INDEX E_ROW-INDEX .
  LV_VBELN = WA_VBRK-VBELN .
  SUBMIT ZINVOICE_DP 
    with p_Vbeln = lv_vbeln
    and return.
ENDMETHOD .

In the ZINVOICE_DP program, you will have an access to P_VBELN to the VBELN.


Parameter: p_vbeln type vbrk-vbeln.

Regards,

Naimesh Patel

Read only

0 Likes
569

Thanks For your Reply.....I solved it with your help.......

Read only

Former Member
0 Likes
569

Hi,

Change


EXPORT LV_VBELN FROM WA_VBRK TO MEMORY ID 'INVOICE'.

by


EXPORT LV_VBELN TO MEMORY ID 'INVOICE'.

This should solve the problem..

Kr,

m.