Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC - unable to paint the quantity screen field

Former Member
0 Kudos

Hi folks,

I am working with BDC. I have a quantity field in my internal table. I am unable to paint the quantity value from my internal table on the screen. I debuged the program and my internal table is having the quantity value in it. But the value is right justified in the internal table field. I am wondering if this is causing any problem.

If this is causing any problem, how can I left justify the quantity value in my internal table field. The field I am talking about is PLKOD-BMSCH. This field is of type 'QUAN'.

PLease help. Waiting...........

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I think you can define a character variable and use a WRITE TO. Use the target field in your BDC.

data: lv_text(10)   type c.
clear lv_text.
write plkod-bmsch to lv_text.

* use lv_text in the BDC

be sure to check the maximum OUTPUT size of PLKOD-BMSCH in the data dictionary. I used 10 as an example and do not have an SAP system available to check.

3 REPLIES 3

Former Member
0 Kudos

I think you can define a character variable and use a WRITE TO. Use the target field in your BDC.

data: lv_text(10)   type c.
clear lv_text.
write plkod-bmsch to lv_text.

* use lv_text in the BDC

be sure to check the maximum OUTPUT size of PLKOD-BMSCH in the data dictionary. I used 10 as an example and do not have an SAP system available to check.

Former Member
0 Kudos

Hi Raju,

Please remove the quantity value from your internal table to a variant which has a CHAR type, then transfer the quantity value from this variant to your BDC screen fields.

Additionally, for the amount value, it's also need this process in BDC programs.

Regards,

Brian Liu

Former Member
0 Kudos

Hi Raju,

When you are working on BDC, it is always recomended to use character data type, so use character datatype and specify an optmal length for the field in your internal table, it works fine dont worry about quantity conversions, it will done internally.

Regards:-

Santosh.D