‎2007 Mar 09 10:55 AM
Hi All,
Iam using bdc to upload data. I have got a time field which would accept only hh:mm. Iam not using any text file to upload the data. All the data is transferred from VL02N. Now the date format here is hhmmss. Can anyone help me to either change this value to the required format or any other suggestions would be of gr8 help
thanks
skk
‎2007 Mar 09 11:08 AM
Assign a variable for time
and use the logic as
data : hr(2) type c value '10',
mm(2) type c value '45',
ss(2) type c value '00',
val type sy-uzeit.
concatenate hr mm ss into val .
write:/ val.submit the val to the time portion of ur Vl02n (o/b devlivery change trnxn )
See eventhough u have hh:mm in ur flat file declare a vareiable val type sy-uziet and ss a variable for seconds default it to '00' and pass the content of hhmmss into val this will take the value in hhmmss format into the Db
try this.
regards,
vijay
‎2007 Mar 09 10:59 AM
data : hr(2),
min(2),
tim(5).
hr = VL02N-<fieldname>(2).
min = VL02N-<fieldname>+2(2).
concatenate hr min into tim separated by ':'.
now tim contains the value.
regards
shiba dutta
‎2007 Mar 09 11:07 AM
take two var hh and mm
hh = time+0(2).
mm = time+2(2).
concatenate the values and assign to time
‎2007 Mar 09 11:08 AM
Assign a variable for time
and use the logic as
data : hr(2) type c value '10',
mm(2) type c value '45',
ss(2) type c value '00',
val type sy-uzeit.
concatenate hr mm ss into val .
write:/ val.submit the val to the time portion of ur Vl02n (o/b devlivery change trnxn )
See eventhough u have hh:mm in ur flat file declare a vareiable val type sy-uziet and ss a variable for seconds default it to '00' and pass the content of hhmmss into val this will take the value in hhmmss format into the Db
try this.
regards,
vijay
‎2007 Mar 09 11:51 AM
Before giving the value of this date field to a screeen filed in BDC program ( I mean before the perform ) U copy the date into a variable of 5 characters...
data w_time(5) type c.
before that perform ...( assuming vlo2n-time is of 6 characters )
use
w_time(2) = vlo2n-time(2).
w_time+2(1) = ':'.
w_time3(2) = vlo2n-time2(2).
perform field_fill using 'Screen no.' w_time.
reward if it helps u...
sai ramesh