cancel
Showing results for 
Search instead for 
Did you mean: 

if condition in smartform

Former Member
0 Kudos

hi,

i have to write a if condition...in the smartform....

this smartform has 1 window called info1...where 1 table is there..in the main area..in ane line area two cells are there...one cell is for vat id text...another is for VAT ID work area.

i have to write down the if condition if VBRK-LANDTX = "CH".

than display VAT ID.

please tell me how to write this one.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You will have conditions tab in the Text Element...You can write VBRK-LANDTX = "CH" in that tab.

Regards,

Vishwa.

Answers (3)

Answers (3)

vikasrao21
Explorer
0 Kudos

Hi

Go Item Text -> Condition

Determine Condition

VBRK-LANDTX = 'CH'

check it

Thanks

Vikas

Former Member
0 Kudos

U can write all these conditions in conditions tabsb one under one,

Former Member
0 Kudos

HI

right click on window follow the path

create >flow logic>alternatve.

goto conditions tabs give ur condition and create texts in true and false condtions,write ur logic

Former Member
0 Kudos

thanx for your reply...but i have 2 to 3 if conditions and some chech statement is also there

NAeda
Contributor
0 Kudos

Create the program lines before the text elements, in that program lines u can write as per your requirment

Thanks

Regards

Former Member
0 Kudos

Hi,

can u elobarate bi tmore.

Former Member
0 Kudos

Priya,

For a cell...if ur talking about more than one condition also...you can give it there...IF the conditons are based on "OR"..even then you can give it there...if you tell me the conditions and you need them in one text node or cell...I can help u further.

Regards,

Vishwa.

Former Member
0 Kudos

if (VBRK-LANDTX = T001N-LAND1 AND VBRK-BUKRS = T001N-BUKRS, CHECK T001N-STCEG IS NOT INITIAL):

than

Our VAT ID No. &T001N-STCEG&.

where our vat id no.(text) is in the 1st cell

and the field is in (&T001N-STCEG&.) 2nd cell

Former Member
0 Kudos

hai,

create source code put all ur condition,

and set flag if condition is sati..

if (VBRK-LANDTX = T001N-LAND1 AND VBRK-BUKRS = T001N-BUKRS, CHECK T001N-STCEG IS NOT INITIAL):

flag = 'X'.

endif.

Our VAT ID No. &T001N-STCEG&.

pass the flag in condition tab.

if flag = 'X'.

Former Member
0 Kudos

For both the cells, you can have these conditions in the conditions tab in the following way...

Field Name:                                          Comparision Value:
VBRK-LANDTX             =                          T001N-LAND1
VBRK-BUKRS              =                          T001N-BUKRS
T001N-STCEG              NEQ                     ' '

Regards,

VIshwa.

Former Member
0 Kudos

hi,

u can write all this condition s tab one uncer one.

Former Member
0 Kudos

hi,

As i told i have so many if conditions...

like

if VBRK-LANDTX = T001N-LAND1 AND VBRK-BUKRS = T001N-BUKRS, CHECK T001N-STCEG IS NOT INITIAL):

than

Our VAT ID No. &T001N-STCEG&.

elseif

VBRK-LAND1 = T005-LAND1, CHECK T005-XEGLD = "X") then the customer VAT ID No. has to be printed additionally

else

(VBRK-LANDTX = "CH"):

Our VAT No. &T001-STCEG&

can i maintain all these conditions in the condition tab

Former Member
0 Kudos

Hi

In this case, you will need two Alternavtives...Whn u right click, you will find Flow Logic..select Alternatives(you can create them under cells)....Write the conditions there..Under "True" create a text element and display it there.

Regards,

Vishwa.

Former Member
0 Kudos

hai,

data : flag ,

flag1

flag2.

as i said before in source code

if VBRK-LANDTX = T001N-LAND1 AND VBRK-BUKRS = T001N-BUKRS, CHECK T001N-STCEG IS NOT INITIAL):

flag = '1'.

elseif.

VBRK-LAND1 = T005-LAND1, CHECK T005-XEGLD = "X") then the customer VAT ID No. has to be printed additionally

flag1 = '1'.

else

(VBRK-LANDTX = "CH"):

flag2 = '1'.

endif.

in the text u will be having condition tab in that

flag = 1.

or

flag1 = 1.

or

flag2 = 1.

shan.