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: 

user specific settings for Date & Quantity fields in screens for BDC

Former Member
0 Kudos

How 2 handle user specific settings for Date & Quantity fields in screens for BDC programs?

A use CONVERT B Handle it by hard coding

C using Write to

D Based on USER name program the code

3 REPLIES 3

Former Member
0 Kudos

should be A

if you date field ,then use FM CONVERT_DATE_TO_INTERN_FORMAT ,it will convert internal format.

Thanks

Seshu

Former Member
0 Kudos

usr WRITE TO

Former Member
0 Kudos

Hi,

<b>Date : </b>

Declare a variable of type C length 10. Then, use WRITE TO as shown below.


  DATA : v_date(10) TYPE c. 
  WRITE date TO v_date.

If your date has value '20070123' then v_date will have 23/01/2007 or 23.01.2007 based on your settings.

<b>

Quantity :</b>

Goto the the domain of the quantity field & check out the output length of it. For e.g. if it is 17, then declare a variable of type C length 17. Then, goto the currency/quantity tab in the table and check out the reference table & reference field name. For e.g. For quantity field VBAP-KWMENG, reference table is VBAP and reference field is VRKME.


  DATA : v_qty(17) TYPE c.
  WRITE kwmeng TO v_qty UNIT reference_table_name-reference_field_name.

Reward points if the answer is helpful.

Regards,

Mukul

Message was edited by:

Mukul R. Kulkarni