2011 Oct 02 5:14 PM
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
2011 Oct 02 6:53 PM
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
2011 Oct 03 5:04 PM
2011 Oct 02 7:10 PM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |