05-21-2010 8:21 AM
Dear All,
I have a required to update reason of rejection of sales order using BDC. I have written a program and calling BDC in loop to update the reason of rejection for multiple sales order. But after 3 - loops bdc is giving error that 'Field VBAP-ABGRU is not an input field' is not an input field, If the same BDC is run in foreground the error is not appearing. While running the BDC in background mode or display error only mode the error is appearing.
Please help
05-21-2010 9:12 AM
HI,
Try to use below code
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
Edited by: Rob Burbank on May 21, 2010 9:45 AM
05-21-2010 9:17 AM
----
data definition
----
Batchinputdata of single transaction
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
messages of call transaction
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
PARAMETERS GROUP(12).
PARAMETERS: USER(12) DEFAULT SY-UNAME.
PARAMETERS: KEEP AS CHECKBOX.
PARAMETERS: HOLDDATE LIKE SY-DATUM.
data: begin of itab occurs 0,
vbeln type vbak-vbeln,
AUGRU type AUGRU,
end of itab.
start-of-selection.
itab-vbeln = '60000336'.
itab-AUGRU = '005'.
append itab.
itab-vbeln = '60000337'.
itab-AUGRU = '006'.
append itab.
perform open_group.
Loop at itab.
refresh: bdcdata.
perform bdc_dynpro using 'SAPMV45A' '0102'.
perform bdc_field using 'BDC_CURSOR'
'VBAK-VBELN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'VBAK-VBELN'
itab-vbeln.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=T\07'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
perform bdc_field using 'BDC_CURSOR'
'VBAK-AUGRU'.
perform bdc_field using 'VBAK-AUGRU'
itab-AUGRU.
CALL FUNCTION 'BDC_INSERT'
EXPORTING TCODE = 'VA02'
TABLES DYNPROTAB = BDCDATA.
endloop.
perform close_group.
05-21-2010 9:20 AM
still your having problem
use write statement for storing vales into BDCDATA table
Ex/- write itab-AUGRU to BDCDATA-FVAL.
Regards
Sudheer
05-21-2010 12:58 PM
Hi All,
Problem is still there. I have tried for the combination. It did not work. Please suggest
05-21-2010 3:07 PM
Are you rejecting all (open) items? If so, use the mass change option. Otherwise, push each item to the top and reject it individually. Personally, I would use the sales order change BAPI for this simple requirement.
05-21-2010 5:09 PM
Why is it not an input field? That's the unanswered question. Are you attempting to reject something that has been delivered or ?? There's a reason that you can't reject that order/item combination, and the logic that decides whether or not to include that item is essential in building the BDC sessions.
05-26-2010 10:49 AM
Hi..
It is not already delivered. If I run in foreground the field is coming as input field, but if I run in background the error is coming that " Field VBAP-ABGRU is not an input field"
05-26-2010 10:55 AM
Hi Ronen,
Is the checkbox "Dynpro standard size" ticked when you process the BI session?
Regards,
Ana Luisa.
09-29-2010 6:21 PM
We're receiving the same message here via IDOC failures.....
Viewing the relevant sales orders, no changes have been made, no lines rejected.
09-29-2010 8:53 PM
For populating line items in table control need to used POSTION option. In VA01, that button is available as 4th button from bottom left of the screen. When this POSTION button is clicked, window pops up for populating the line item number. Give the line item number and hit ENTER, that line item is place on first record of table control.
Using this logic for you could populate all line items at index 1 as VBAP-ABGRU(01)