‎2009 Dec 30 9:31 AM
Hi Experts,
I have used the alv list report
for eg: the output is
vendor.no plant quantity
i had displayed quantity's sum at the end of the field(quantity),using do_sum = 'x'.
that total amount(wrbtr) should display in FB60(in amount field)
i had used bdc for this,but im getting the error as
FIELD INVFO-WRBTR. input value is longer than screen field
Can anyone suggest me on this issue.
Regards,
Sharmila.S
‎2009 Dec 30 11:02 AM
Take the quantity in the character field. Use CONDENSE..NO GAPS and then pass that to BDC screen field INVFO-WRBTR.
‎2009 Dec 30 9:36 AM
Check the subtotal , is it more than length 13.
You need to check INVFO-WRBTR it is having length more than what your are giving on screen.
Did you considered 2 decimal length?
Edited by: Harsh Bhalla on Dec 30, 2009 3:06 PM
‎2009 Dec 30 9:38 AM
the quantity field is based on the calculation.the user will enter the value.
as of now the value is 5,572,347.66
‎2009 Dec 30 9:40 AM
Check the data type you are using for this field which is passed to BDC.
Preferably use data type as C, with length same as the original data type.
Hope this helps!!!
‎2009 Dec 30 9:43 AM
If i give date type c with the original llength.Im not getting the sub total amount,it picks only the line item value
‎2009 Dec 30 9:46 AM
You have to pass this total quantity to the BDC screen, if i get it correctly.
Assign this total Quantity to a variable of data type C.
Pass this new variable to the BDC screen.
‎2009 Dec 30 9:47 AM
‎2009 Dec 30 9:52 AM
Also the correct length for this variable would be 16 & not 13.
13 + 2 decimal + . point.
‎2009 Dec 30 9:55 AM
i have changed field length as 16.
but now also im getting the line item value not the subtotal.
‎2009 Dec 30 9:52 AM
Hi,
Try using CONVERSION routine to convert the total, that you have calculated, into input format. And then assign this converted value to the BDC table.
Regards,
Bhavesh.
‎2009 Dec 30 9:57 AM
‎2009 Dec 30 10:40 AM
Check the value on runtime in debug mode.
Check what value is passed to the BDC session. You can get some help from there on.
Probably the total is not assigned correctly to the variable passed in BDC.
‎2009 Dec 30 10:50 AM
In debugging mode the total is fetching but in the display it is showing the error as FIELD INVFO-WRBTR. input value is longer than screen field
‎2009 Dec 30 11:02 AM
Take the quantity in the character field. Use CONDENSE..NO GAPS and then pass that to BDC screen field INVFO-WRBTR.
‎2009 Dec 30 11:10 AM
applied your concept but only line item value is coming,i need the total value
‎2009 Dec 30 11:27 AM
I think you are using do_sum = X for getting the total Quantity.
So the total would be availble during runtime in ALV.
Can you clarify how are you passing the total quantity to the BDC screen.
‎2009 Dec 30 11:53 AM
im passing the quantity to another internal table and collecting it.that collect value only im passing to bdc
‎2009 Dec 30 12:02 PM
If you are getting a line item value instead of total, then I guess the collect is not working properly for caluculating the total. Check if the collect statement is working properly.
‎2009 Dec 30 12:06 PM
If you are getting a line item value instead of total, then I guess the collect is not working properly for caluculating the total. Check if the collect statement is working properly.
‎2009 Dec 30 12:09 PM
If you are getting a line item value instead of total, then I guess the collect is not working properly for caluculating the total. Check if the collect statement is working properly.
‎2009 Dec 30 12:15 PM
Hi,
Run the BDC in all display mode once. And check what is the value mapping to that field.
There might be some other issues like mapping incorrect source to target.
You can resolve the problem in this way.
Run the FB60 transaction directly with your inputs...here you can easily identify the problem.
If every thing works good from transaction then check the same thing with your program, in all display mode.
comeback here if you find any difficulty.
Thanks,
Naveen Inuganti.
‎2009 Dec 30 12:18 PM
if i declare the collect
for eg value type dmbtr.
it is working in the debugging but not display in fb60.
if i declare the collect
for eg value(13) type c.
it is fetching the line item.
‎2009 Dec 30 12:23 PM
Just declare the collect as the first option like value type dmbtr.
And while filling the BDC table take it into character and use CONDENSE..NO GAPS and and then transfer to FVAL.
Also in debugging check if value is coming properly in FVAL of that screen field.
‎2009 Dec 30 12:48 PM
While debugging,im getting two value
headerline 4900.00 (last value of the line item)
5572347.66(total value)
only 4900.00 value is moving to fb60
‎2009 Dec 30 12:56 PM
Can you show the code how you are moving the values to BDC table from your internal table?
I guess the correct value is not getting moved to the BDC table.
‎2009 Dec 30 1:01 PM
data:value type c.
loop at it_mseg1.
move it_mseg1-lifnr to bdc-lifnr.
move it_mseg1-werks to bdc-werks.
move it_mseg1-diff to bdc-diff1.
collect bdc.
clear it_mseg1.
endloop.
value = bdc-diff1.*this is the value*
CONDENSE value no-gaps.
loop at bdc.
perform bdc_dynpro using 'SAPMF05A' '1100'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'INVFO-WRBTR'
value.*
*perform bdc_field using 'INVFO-WRBTR'
value.*
*perform bdc_field using 'INVFO-WRBTR'
value.*
*perform bdc_field using 'INVFO-WRBTR'
value.*
*perform bdc_field using 'INVFO-WRBTR'
value.*
*perform bdc_field using 'INVFO-WRBTR'
value.*
CALL TRANSACTION 'FB60' USING BDCDATA MODE 'A' .
ENDLOOP.
ENDCASE.
ENDFORM. "USER_COMMANDEdited by: Sharmila Somasundaram on Dec 30, 2009 6:31 PM
Edited by: Sharmila Somasundaram on Dec 30, 2009 6:52 PM
‎2009 Dec 30 2:14 PM
Value should be have length 16. Declare like this data: value type char20.
Type c means only one character field.
‎2009 Dec 30 2:19 PM
You wrote:
headerline 4900.00 (last value of the line item)
5572347.66(total value)
Only 4900.00 is moving...Because "Value" is having 4900.00 only.
check the problem in your code here:
loop at it_mseg1.
move it_mseg1-lifnr to bdc-lifnr.
move it_mseg1-werks to bdc-werks.
move it_mseg1-diff to bdc-diff1. <--- 4900.00 for last record
collect bdc.
clear it_mseg1.
endloop.
value = bdc-diff1. <---- this work area bdc-diff1 can have last record value only i.e. 4900.00change code some thing like this.
loop at it_mseg1.
value = value + it_mseg1-diff. <--- fill value here.
move it_mseg1-lifnr to bdc-lifnr.
move it_mseg1-werks to bdc-werks.
move it_mseg1-diff to bdc-diff1.
collect bdc.
clear it_mseg1.
endloop.Thanks,
Naveen.I
‎2009 Dec 30 2:34 PM
Check if MSEG-DIFF1 is getting populated correctly. If it is getting populated correctly then I guess only data type of value is the problem.
‎2009 Dec 30 2:37 PM
Agreed with Naveen the problem is that either you need to add the quantity is some varaiable inside the loop or otherwise read the table with index 1 after the loop and then pass the value into BDC.
‎2009 Dec 31 3:38 AM
Hi Naveen,
Thanks a lot i got the answer.
Edited by: Sharmila Somasundaram on Dec 31, 2009 11:35 AM
‎2009 Dec 30 11:14 AM
Hi Sharmila,
What I want to say is keep the data type of quantity equal to WRBTR in final internal table which you are showing in ALV.
In that case you will get the correct subtotal . And during populating BDC table take the quantity field in character and use CONDENSE..NO GAPS.
Let me know in case of any issues.
‎2009 Dec 30 11:51 AM
‎2009 Dec 30 12:04 PM
If you are getting a line item value instead of total, then I guess the collect is not working properly for caluculating the total. Check if the collect statement is working properly.