cancel
Showing results for 
Search instead for 
Did you mean: 

Hide the value and the text when there is no value in the script

Former Member
0 Kudos

Dear All

I am working in scripts my question is.

when there is no value for particular field then the value with the related text should be hidden . Kindly suggest with a solution as an earliest,

Eg suppose

Material : m-000.

Material group :

Pstl : In

So here since there is no value for material gruop here that related text material gruop should also be hidden and skipped i mean pstl should go in place of material group.

Hope you understood my issue kindly suggest .

Regards,

Sana.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Then put the entire content within & 'Text.....:' table-field &.( Do not use spaces in between & & here i used to show clearly)

Regards,

Ram

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

u can do this in 2 ways,

1. put condition in the script before u printing

eg:

Material No:

IF &mara-mtart& NE space

Material Group: &mara-mtart&

endif

Pstl:

2. U keep the Material Group in an elelment, and check the condition in print program

eg:

In Print Program:

if not mara-mtart is initial.

call function 'WRITE_FORM'

element = 'MAT_GRP'

window = 'WINDOW_NAME'.

endif.

In script:

/E MAT_GRP

P1 &mara-mtart&

it alwys prints only when the mat group is not initial.

Hope it works!!

Rgds,

Pavan

Former Member
0 Kudos

Hi,

Try to place a condition before displaying the text element.

check if any one of the value is missing.

if any one value is blank do not display.

Hope this will help u.

regards,

Tulasi.