cancel
Showing results for 
Search instead for 
Did you mean: 

Show standard texts on document

Former Member
0 Kudos

Hi all,

Our customers have the need to show some text on the bottom of some documents (invoice, order confirmation). Normally, I would use SO10 for the text. No problem there.

In general, those texts have a limited time in which they should be printed on the documents. Is there a way (or table) in which you can define texts as well as a start date and/or an ending date?

Any other solution is also welcome

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

jie
Advisor
Advisor
0 Kudos

Hello Karin,

Is the starting data and ending data statistic or dynamic?If dynamic,where it comes from?
table or variable value?

Thanks&Regards

Jie Bai

Former Member
0 Kudos

Hi Jie,

The dates are to be determined by the user himself (most of the time they are texts concerning actions, holidays, and so on). They are not defined in a table.

They can differ for each sales organization and should be language dependent.

Regards,

Karin

jie
Advisor
Advisor
0 Kudos

Hello Karin,

Here is my suggestion.

define a variable in your own program,Also define the same in the smartform which you use to
print the invoice, order etc...In the smartform,create a text node and you can see the condition
tab,you can define 'if' condition here.

when user input the data,it pass to smartform and be judged by the 'if' condition,so that the text
can only be printed in limited data.

Hope this helps on your query.

Regards

Jie Bai

Florian
Active Contributor
0 Kudos

Hi KArin,

just create a table with so10-name, startdate, enddate.

LEt the customer maintain this table and just select it in your smartform and pass the value. It might be a bit more work, but you know, I think it will be a forever solution

Example:

so_10text_holiday   10.03.2014 - 25.03.2014

If the date passed by, your select doesn't get it and nothing is printed after the date:-)

Regards

Florian

Former Member
0 Kudos

Sounds promising, Florian. So, in the name of the SO10-object I (or the user) can define a date, but how do I check if the date is inbetween them?

I hate to have so little ABAP-knowledge (ask me anything in Progress/OpenEdge).

Florian
Active Contributor
0 Kudos

Hi Karin,

it just depends on what date is the correct one to check. Todays date is in SY-DATUM always included and always available.

In your case, it is a invoice and I can imagine that the VBRK-ERDAT (date when the invoice is created) or even the VBRK-FKDAT (date when the invoice is booked) maybe also a good solution.

Both fields are included in the structure VBDKR by the way

For your order confirmation have a look in table VBAK / VBDKA. The fields there are ERDAT and AUDAT I think.

The select statement should look something like that:

Select single ... from     yourtable

                        into     yourstructure

                        where datefrom <= sy-datum

                           and dateto    >= sy-datum.

IF sy-subrc = 0.

*whatever you want to do now

ENDIF.

~Florian

Former Member
0 Kudos

Hi Florian,

My problem is how to extract the two dates out of the name of the SO10-object.

Florian
Active Contributor
0 Kudos

Hi Karin,

now I do not get it.

You needn't to split anything by developing a table with 3 columns in.

Anyway, check the SPLIT statement.

Here is a link:

Splitting Character Strings - ABAP Programming (BC-ABA) - SAP Library

~Florian