‎2006 Nov 27 5:01 AM
Hi,
how can we only print month from a date field in smartforms.
e.g. 21.08.2006(Ardat) . how can we print 08 from this field.
regards
Rahul
‎2006 Nov 27 5:04 AM
‎2006 Nov 27 5:04 AM
You will have to write a piece of code, to extract the date and put in a variable. Use that to print the month.
You can create a PROGRAM LINES object and write the code there.
Month = date+0(2).
Regards,
Ravi
Note - Please mark all the helpful answers
‎2006 Nov 27 5:04 AM
Pass the data to one more variable and print in smart form.
Ex. g_month(2) type c.
g_month = date+2(2).
‎2006 Nov 27 5:04 AM
‎2006 Nov 27 5:06 AM
Hi Rahul
For DATS data type, you can use statement like below:
<b>write:/ sy-datum+4(2).
or as in your case:
write:/ ardat+4(2).</b>
Kind Regards
Eswar
‎2006 Nov 27 5:06 AM
Hi,
Just store the date value in a variable.Use program lines to do the coding.
General declaration->v1(10) type c.
v2(2).
Input :
ardat
Output :
v1
v2
Coding:
v1 = ardat.
v2 = v1+3(2).
unpack v2 to v2.
Create text element and print v2 there.
Even you can avoid using v1 by assigning ardat+3(2) directly to v2.
Kindly reward if it helps.