cancel
Showing results for 
Search instead for 
Did you mean: 

How to suppress a property being output to a label once a date has been reached

Former Member
0 Kudos

Hi,

I would like to suppress a property being output to a label once a date has been reached. I have tried the WWI conditional output functionality but am experiencing issues.

The issue is the symbols I am wanting to use have different expansion times.

For example:

The property contains a CHAR30 phrase-related characteristic and a DATE FORMAT characteristic.

I only want to output the phrase if the current date the label is printed is the same or later than the date assigned in the property.

When I try to create the conditional output:

 

<11BRG200(M,ZSAP_EHS_1011_014;*)>

<15BIF100(AND:01GZE1_ZE145 GE S:02EHS_RPPRIN)><01GZE1_ZE10G(P;*)[D:Grant
No.]>
<15EIF100>

<11ERG200>

On checking the template, I get the message 'Repeating group IF 100: Different expansion times for condition symbols'

SAP Help does tell me that:

· If you enter a number of symbols in the condition, these must all have the same expansion time. If you require a conditional output that is dependent on symbols with different expansion times, you have to nest a number of conditional outputs.

Does anyone know how I can achieve this?

Best regards

Karen Waterworth

Accepted Solutions (0)

Answers (2)

Answers (2)

michael_hofer
Explorer
0 Kudos

Hi Karen,

I would use a parameter symbol. Parameter symbol (type 02) are resolved when you print the label. In the ABAP code of the parameter symbol I would check the current date with the date in your property. If the current date is the same or later like the date in your property I would set the value to an 'X'.

The template is using the parameter symbol in a blank compression. Inside of the blank compression you have that Grant No. . Depending on the parameter symbol the data is suppressed or displayed.

The disadvantage of that solution is that you disabling the basic idea of EH&S. Normally the EH&S data on your label are fixed in the report body. No changes in the template/EH&S specification database will change the content in a report body.

If somebody is changing the date in EH&S it will have an impact of the EH&S data (Grant No. is printed or not) on your label... .

Regards,

Mike

Former Member
0 Kudos

Hi Michael

I will try that as the date is unlikely to be changed (unless incorrect), and it is exactly what we are wanting to achieve, only output the Grant number when printing the label if the expiry date has not been reached.

Example of data held in SAP:

Header 1Header 2
Grant No.US 5,590,111
CountryUS
Expiry Date01.01.2035
UsageLABEL: US

Grant number only output until expiry date reached (ie earlier or same date, not later as I put in my question!)

Thank you

Karen

christoph_bergemann
Active Contributor
0 Kudos

Dear Karen

one new idea and some add on regarding "Change Numbers"

Your "principal" demand fits well the SAP design of "Change numbers". On high level: you can use change numbers in maintenance operations in CG02. Change numbers"describe" a "time period" etc. in which data is valid. So by using a Change number (e.g. in your case valid for 01.01.2035) you can just do this:

a.) use the change number; switch to the value assignment (data record) and delete it. The data will now be shown in CG02 until 31.12.2034 and therefore can not be selected any more startring 01.01.2035. Using this "simple" approach you avoid any programming

b.) in your case it is a very "fictive" example. But if the experiy date would be e.g. 31.12.2014 this would be the "best" option: user just log on on 01.01.2015 and remove the active flag indicate of rating "LABEL" and the data can not show up any more in WWI report

Simple and can be done without any programming. Based on experince. it is not a "clever" idea to use often "if/else" or whatever kind of operation in WWI. In many cases the usr community does not understand this very well. Clearly: it is normal SAP EHS stuff.. but to explain why this and not a different data is shown is not easy using "if else etc." or any similar conditions.

IN any kind: simply try now the options mentioned and play around.

C.B.

PS: May be check:

christoph_bergemann
Active Contributor
0 Kudos

Dear Karen

nether tried this way around. Why do you not use "Change numbers"? If you maintain the data record using a changE number which is valid until the date in characteristic it is not valid "automatic" the next day. Only "con" may be: if you select as the key date in CG02 the "next day" then the value is not shown in CG02 any more(and even if you not use the key date and use the recent date it will not shwon up; tricky thing to use change numbers) I do not know if you need this effect

My assumption would be: the current "date" is a "parameter" value. It can not be of type "report symbol". I did not get the idea SAP is proposing, This would be "my story".

If you read data from property tree this is done using a specific report symbol which uses an certain expansion time. So may be the logic might be: first check the recent date; put this e.g. on a "stack"; and then use this value on stack to compare with the value read.  I am not sure about the explanation of SAP

C.B.

Former Member
0 Kudos

Dear Christoph,

We do not use change numbers in SAP, however I will also try your suggestion of using the stack logic.

Thank you

Karen