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: 

help in smart form urgent

Former Member
0 Kudos

HALLOW

i use lb bill invioce and i have a problem with format of dates, whan i print the invoice ,some time the format is o.k. like date 30.8.2007 and sometimes the format of dates is 08/30/2007 (wrong) and i dont do anything just print diffrent bill

what can be the problem?

i reward kindly

Regards

1 ACCEPTED SOLUTION

alpesh_saparia3
Active Contributor
0 Kudos

Problem could be specific to user.

BASIS Job: In user maintenance - Defaults, there is setting for Date format.

-Alpesh

11 REPLIES 11

alpesh_saparia3
Active Contributor
0 Kudos

Problem could be specific to user.

BASIS Job: In user maintenance - Defaults, there is setting for Date format.

-Alpesh

0 Kudos

Hi ,

Just put the syntax SET DATE MASK = 'DD.MM.YYYY' just before your data is printed. I hope you know where to put this syntax. No need to worry about user specific format.

Regards,

Nageswar

0 Kudos

hi nageswara

i use sp standard lb_bill_invoice and i wont to cahnge that for all the format of dates (i have more then one date)in the invoice to be the same how i do that?

Best regards

0 Kudos

The date format will change depending on the country to which your invoice is being sent and will be set automatically from table T005X. Check the country of the business partner on the form

So, if the business partner is in America (US) the date will be 08/30/2007, if they are in Britain (GB) it will be 30/08/2007.

This means it is formatted correctly for the person in the country who will be reading it, not the developer or the sender.

Regards,

Nick

0 Kudos

hi nick

thankes for your answer !

i have to change the format to be same for all bills there is way to do that?

Regards

0 Kudos

You could create some ABAP lines in your Smartform to MOVE your date field to a character field. If you then use this character field in your text element the country formatting will not be applied.

Regards,

Nick

0 Kudos

hi nick

maybe u can give me example how to do that,i new in SF.

Regards

0 Kudos

Ok, here goes.

Smartform section Global Definitions, tab Global data. Variable G_DATE TYPE CHAR10.

In the form, just before you want to display the date create a node 'Progam Lines'

In the 'Input parameter' section put the name of the field that contains your date (let's say it's called MY_DATE).

In the 'Output parameter' section put G_DATE.

In the editor put,

MOVE: MY_DATE(4) to G_DATE+6(4),
                     '/' to G_DATE+4(1),
                     MY_DATE+4(2) to G_DATE+3(2),
                     '/' to G_DATE+2(1),
                     MY_DATE+6(2) to G_DATE(2). 

(replacing MY_DATE with the name of the date field in your form)

Now use field G_DATE in you text element instead of the original date field.

Enjoy.

Nick

0 Kudos

thankes for your replais

i have solved it in tables t0005x i cahnge the country date format to 1

and its work?

tankes

i have anoter problem i open new tre maybe u can help

Regards

Former Member
0 Kudos

the best thing is check with basis consultant and make the date format unique. why unnessary coding and degarding performance will be taken for toss.

reward me for this valuable suggestion.

0 Kudos

Hi Sandeep,

I'm interested in what you suggest (always wanting to avoid unnecessary code). How will the basis consultant be able to change the way this date appears?

Thanks,

Nick