cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

IF statements not working in CG12

Former Member
0 Kudos
127

Hi,

I need to validate certain fields before I include the text objects in the CG12 SAP SCRIPT editor.

But IF statements are not working inside the editor.Is there any way to do this ?

Thanks,

Harini.

Accepted Solutions (0)

Answers (1)

Answers (1)

JuanCarlosDelga
Contributor
0 Kudos

Hi

IF statements only work in a sapscript, SE71. Yoou can´t use commands here, like in smartforms.

Regards.

Former Member
0 Kudos

Hi,

Any other way to check the field contents before I add the text in the editor??

Thanks,

Harini.

Former Member
0 Kudos

Hi,

What do you want to use the phrases for?

Phrases are more or less static text mainly printed on EH&S documents like MSDS and Labels with WWI Reports.

If you need more flexibility try to do that with WWI coding.

If this doesn't work for you create custom WWI Symbols - there you can do pretty much everything.

Hope this helps

Mark

Former Member
0 Kudos

I need to extract these phrases and put them on the output for Outbound Delivery Note.

Thanks,

Harini.

christoph_bergemann
Active Contributor
0 Kudos

Hello

I believe there might be a "mismatch" of understanding what Cg12 is used for in the context of DG output (outbound delivery note)

CG12 is not used (and should not be used !) to "manipulate" the phrases (I have never used an IF statement like discussed here to print something on DG documents) .As explained they are "static" in some sense.

In this FORUM a Thread is cited regarding the so called " place holder" phrases. One fuiction is DG related the other is MSDSS related.

Therefore you "never" change the phrase content in th DG output but you use the phrase "text" in your ABAP to "collect" some informations from several places to bring it together to be printed on DG documents.

But this techniqud does not ! change the phrase texts it self.

Example: if you would like collect "text" ond DG documents the normal EHS set up is like this:

1.) prepare a phrase with several texts per language (special techniqe!)

2.) assign ! an userExit ! to the phrase

Now the process runs like this (very short explanation)

a.) dangerous goods classificaiton need to be done

b.) dangeruus goods filling need to be done => relsut in the DG master you will find these "special" phrases

c.) Now you use this "Userexit" to collect the "texts" in one "String" whcih you will then print on DG documents

With best regards

C.B.

PS: using the SAP Scprict Editor you can do a "lot" in the phrase; but to my knowlede this will only work if there is an userexit assigned to the phrase

PPS: In a quick research I found this link which might help:

link:http://help.sap.com/saphelp_srm40/helpdata/en/a6/fb493a7dc7f822e10000000a114084/content.htm

Titel: Output of Dangerous Goods Information Using Text Patterns

http://help.sap.com/saphelp_srm40/helpdata/en/83/0c533a370c3f16e10000000a114084/content.htm

Titel:

Editing Text Patteern

Edited by: Christoph Bergemann on Apr 9, 2011 8:52 AM

Edited by: Christoph Bergemann on Apr 9, 2011 8:54 AM

Edited by: Christoph Bergemann on Apr 9, 2011 8:56 AM

Edited by: Christoph Bergemann on Apr 9, 2011 8:56 AM

Edited by: Christoph Bergemann on Apr 9, 2011 8:58 AM

Edited by: Christoph Bergemann on Apr 9, 2011 9:00 AM