2007 Apr 02 7:04 PM
Hi all,
Iam writing a bdc program and passing the values from the internal table.
I have declared the field using standard table,
mabst like marc-mabst,
Iam reading the value from marc , then iam reducing it to half
data: begin of mat_int_table occurs 0,
matnr like mara-matnr,
werks like marc-werks ,
bstrf like marc-bstrf,
mabst like marc-mabst,
minbe like marc-minbe,
end of mat_int_table .
select * from marc where matnr in smatnr and
werks in swerks.
clear mat_int_table.
move marc-werks to mat_int_table-werks.
move marc-matnr to mat_int_table-matnr .
move marc-bstrf to mat_int_table-bstrf.
mat_int_table-mabst = ( marc-mabst / 2 ).
move marc-minbe to mat_int_table-minbe .
append mat_int_table.
loop at mat_int_table.
refresh bdcdata.
perform bdc_field using 'BDC_CURSOR'
'MARC-MABST'.
perform bdc_field using 'MARC-DISLS'
'HB'.
perform bdc_field using 'MARC-MABST'
'200'.---- this thing works.
MAT_INT_TABLE-MABST. -
this is where iam having problem
endloop.
the error iam getting is
Field MARC-MABST. input value is longer than screen field
Can anyone tell whats the issurein here
Thanks
2007 Apr 02 7:11 PM
Hi,
I had a similar problem once in BDC with a amount field. What i did is create a field of type character and pass it to BDC.
In you case MARC-MABST is quantity field. You defined a field as
<b>DATA: l_MABST(13) type c.</b>
Assing the value of MARC-MABST to l_MABST and use l_MABST in your BDC. It will solve your problem.
So, your code would be
*************************************************
l_MABST = MAT_INT_TABLE-MABST.
perform bdc_field using 'MARC-MABST' l_MABST.
*************************************************Let me know if you have any question.
Regards,
RS
Regards,
RS
Hi,
I had a similar problem once in BDC with a amount field. What i did is create a field of type character and pass it to BDC.
In you case MARC-MABST is quantity field. You defined a field as
<b>DATA: l_MABST(13) type c.</b>
Assing the value of MARC-MABST to l_MABST and use l_MABST in your BDC. It will solve your problem.
So, your code would be
*************************************************
l_MABST = MAT_INT_TABLE-MABST.
perform bdc_field using 'MARC-MABST' l_MABST.
*************************************************Let me know if you have any question.
Regards,
RS
Regards,
RS
2007 Apr 02 7:11 PM
Hi,
I had a similar problem once in BDC with a amount field. What i did is create a field of type character and pass it to BDC.
In you case MARC-MABST is quantity field. You defined a field as
<b>DATA: l_MABST(13) type c.</b>
Assing the value of MARC-MABST to l_MABST and use l_MABST in your BDC. It will solve your problem.
So, your code would be
*************************************************
l_MABST = MAT_INT_TABLE-MABST.
perform bdc_field using 'MARC-MABST' l_MABST.
*************************************************Let me know if you have any question.
Regards,
RS
Regards,
RS
2007 Apr 02 7:11 PM
Hi,
I had a similar problem once in BDC with a amount field. What i did is create a field of type character and pass it to BDC.
In you case MARC-MABST is quantity field. You defined a field as
<b>DATA: l_MABST(13) type c.</b>
Assing the value of MARC-MABST to l_MABST and use l_MABST in your BDC. It will solve your problem.
So, your code would be
*************************************************
l_MABST = MAT_INT_TABLE-MABST.
perform bdc_field using 'MARC-MABST' l_MABST.
*************************************************Let me know if you have any question.
Regards,
RS
<b>Sorry, double posting due to network problem.</b>
2007 Apr 02 7:14 PM
2007 Apr 02 7:24 PM
Hi
RS - I got it resolved by your suggestion
Is athere any particular reason for that.
Raymond, we cannot use write marc-mabst to xyz because it s quantity field.
so you mean to move into char field and then write to xyz.
is that what you are saying let me know
thanks
venki
2007 Apr 02 7:59 PM
Hi,
I do not know what the exact reason is, but it has something to do with the "internal length" of data type and "display length" of data type. This issue is prevalent for currency field, amount fields.
Thats is the reason that when you do BDC it is always recommended to use the field of type C ( Character) to pass the values of all of your field.. So, pass your field value to field of type character and then pass it to BDC table. This problem does not happen for field type DEC, CHAR, NUMC because here, "field length" and "display length" is same.
I hope this clarifies your doubt.
If your issue has been resolved, please award the points accordingly and close the thread. So in future if someone has same issue it is easy for someone to find the solution with "answered" thread.
Let me know if you have any question.
Regards,
RS
2007 Apr 02 8:11 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |