cancel
Showing results for 
Search instead for 
Did you mean: 

Need a horizontal bottom line across form only if field A has some value

Former Member
0 Kudos

Hi,

I have line items in a table and they have 3 columns .

I need a horizontal bottom line across form ( i.e for all 3 columns ) only if COLUMN1 -field A has some value else I don't need this line.

How can we achieve this?

Rgds

Vara

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vara,

One way of doing this, draw a line using the 'LINE' option from the library. A field 'Line1' gets inserted in the hierarchy. Then right click on the line field and say 'Wrap in subform'. Now click on the subform and choose 'initialize' event. Here you can write the code...

Click on field A and get the field A path

if (data.#pageSet[0].Page. .................... (full path of the field A).rawValue == NULL)

{

this.presence = "hidden"

}

else

{

this.presence = "visible"

}

Hope this helps.

Regards,

Vidya Chowdhary A.

Edited by: Vidya Chowdhary on Apr 22, 2009 3:41 PM

Former Member
0 Kudos

Vidya,

Thank you for your response.I have followed your instructions

Here is how my hierarchy looks like.

DetailForm
   - ZDET(Line item table)
        -Header
        -DATA
   - Lineform
        -Line1

I took fullpath of that field A first :

ADOBE_DATA.#subform[0].Detailform.ZDET.DATA.PHCODE

Then I went to subform(lineform) Initialize event

and dropped this code.

if (data.#pageSet[0].Page.ADOBE_DATA.#subform[0].Detailform.ZDET.DATA.PHCODE.rawValue == NULL) 
{
this.presence = "hidden"
}
else
{
this.presence = "visible"
}

This is only giving me 1 line at the end of table .My intention was to display this line whenever there is a content

in the field A.

What am I doing wrong? Do i need to change something?

Rgds

Vara

Former Member
0 Kudos

Hi,

I guess the line is displayed at the end of the table as the subform is at the same level as header and data subforms. Wrap the last field into a subform and drag this subform 'Lineform' inside this.

Also, please put null in small letters.

Regards,

Vidya Chowdhary A.

Edited by: Vidya Chowdhary on Apr 22, 2009 8:03 PM

Former Member
0 Kudos

2 Vara K:

Why use programming when there's codeless solution?

Why use some symbols imported from ABAP when there are built-in functions for nice and correct formatting of border inside form tool?

See for working example

Edited by: Petr Perstnev on Apr 23, 2009 4:02 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

Petr,

Thank you very much Petr for your suggestions & tips.

It worked! I am awarding you full 10 points.

Rgds

Vara