‎2009 Jun 26 11:57 AM
Hello,
I am calling VA01 from my program using call transaction and skipping first screen.
In the line items, I am adding material and quantity with some logic in PBO of my Z program.
However when I confirm the entry by hitting enter key, nothing is happening. This is when VA01 is called from Z program.
However, if I hit Enter key on VA01 directly, the the other fields like material description, item number etc are coming automatically.
Any idea how do I do this?
Thanks a lot in advance.
~Pranu
‎2009 Jun 26 12:12 PM
Hi Pranu,
I do not know how you have written the logic.
But please try to do the recording for the known values using transaction code SHDB. Add that recording accordingly with proper data, proper looping in your Z-program.
Regards,
Anil Salekar
‎2009 Jun 26 12:18 PM
Hello Anil,
There is no problem in Z program.
I have the data and its passed successfully to VA01.
In VA01 if I place a cursor on the material field and hit enter, the appropriate data in line items is calculated by SAP and displayed.
This is not happening when the VA01 is called from Z prog.
However, if I do the same things in VA01 directly (not from my program), the data in the line item is coming after aadd the material and hit the enter key.
‎2009 Jun 26 12:48 PM
Instead of using a BDC call, why don't you try to use a BAPI: search on BAPI_SALESORDER_CREATE*
‎2009 Jun 26 12:58 PM
Hi,
Just tried this in my system, calling VA01 from Z program and i entered the Material, other details descriptions etc got populated automatically. No problem here
>
> In the line items, I am adding material and quantity with some logic in PBO of my Z program.
Can you just paste that part of the code
Regards
‎2009 Jun 26 4:17 PM
Thanks for the reply.
My exact requirement is :
Through QM02 (Notifications) create a Credit Memo.
I have an enhancement point in program : FV45PFAP_XVBAP_LESEN
I created a Zenhancement here and added the logic as below:
====
get parameter to get Notification Number.
Select MAterial and Quantity from table QMEL.
then I modified the VBAP structure
vbap-matnr = l_qmel-matnr.
vbap-zmeng = l_qmel-zmeng.
====
Nothing more than this.
This enhancement point is available in the PBO of SAPMV45A and screen : 4902
Now, when the control goes from QM02 to VA01 (functions -> sales -> create credit memo)
my material and quantity could be seen on VA01 screen.
The line item could be seen.
When I hit enter button - nothing happens.
When I save - credit memo is created with No line item.
ANy idea??
‎2009 Jun 28 8:53 PM
‎2009 Jun 26 1:01 PM
Hi Pranu,
The problem might be because of two different screens populating at same time.
Try writing a BDC for the same functionality and then use CALL Transaction as I have used it for transaction FK03 below.
*-- Populate the BDC table with Vendor Info
CLEAR wl_bdcdata.
wl_bdcdata-program = 'SAPMF02K'.
wl_bdcdata-dynpro = '0106'.
wl_bdcdata-dynbegin = 'X'.
APPEND wl_bdcdata TO tl_bdcdata.
CLEAR wl_bdcdata.
wl_bdcdata-fnam = 'BDC_OKCODE'.
wl_bdcdata-fval = '/00'.
APPEND wl_bdcdata TO tl_bdcdata.
CLEAR wl_bdcdata.
wl_bdcdata-fnam = 'RF02K-LIFNR'.
wl_bdcdata-fval = fp_selfield-value. "Vendor
APPEND wl_bdcdata TO tl_bdcdata.
*-- General data
CLEAR wl_bdcdata.
wl_bdcdata-fnam = 'RF02K-D0110'. "Address
wl_bdcdata-fval = 'X'.
APPEND wl_bdcdata TO tl_bdcdata.
CALL TRANSACTION 'FK03' USING tl_bdcdata MODE 'E'.
Regards,
Amit.
‎2009 Jun 29 8:25 AM
Not answered. But have to close since I have to ask new question.