Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

undo BOX sentence in sapscript

former_member182371
Active Contributor
0 Likes
697

Hi,

in my sapscript i´ve got the sentence BOX in order to display a frame around a window.

is it possible to undo this sentece, that is, once the flow of the program has put a frame around the window

is it possible to somehow erase it

(

or display a blank frame

)?.

Best regards.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
674

Hi

Before the actual loop , please loop once on table i_PICK

and decide whether you want to print BIGFRAME / SMALLFRAME . I guess you are clear on what condition you want which frame . Proram cannot decide for you , you will have to buils a logic to decide .

Move this to a work area W_ELEMENT.

later in the loop use only this variable W_ELEMENT to either print BIG or SMALL Box.

Cheers .

5 REPLIES 5
Read only

former_member182371
Active Contributor
0 Likes
674

Hi,

any suggestions?

is it not possible?

Best regards.

Read only

Former Member
0 Likes
674

Your requirement is not clear .

Is it custom program /sapscript.??

Read only

former_member182371
Active Contributor
0 Likes
674

Hi,

in my

print program

i´ve got:

LOOP AT i_pick WHERE selec = 'X'.

CLEAR: l_div, g_dif, l_rest.

l_count = l_count + 1.

l_div = l_count DIV 20.

l_rest = l_count MOD 20.

l_div = l_div + 1.

g_dif = ( l_div * 20 ) - l_count.

g_hojas = g_hojas + i_pick-tomad.

g_bruto = g_bruto + i_pick-alter.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'POSITIONS'

WINDOW = 'MAIN'

EXCEPTIONS

OTHERS = 1.

IF g_dif < ' 7'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'BIGFRAME'

WINDOW = 'MAIN'

  • FUNCTION = 'SET'

EXCEPTIONS

OTHERS = 1.

ELSE.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'SMALLFRAME'

WINDOW = 'MAIN'

  • FUNCTION = 'SET'

EXCEPTIONS

OTHERS = 1.

ENDIF.

ENDLOOP.

in my

MAIN window

i´ve got the following code snippet:
/E BIGFRAME
/: POSITION WINDOW
/: POSITION XORIGIN '-0.5' CH YORIGIN '-0.25' LN
/: SIZE WIDTH '+0.4' CH HEIGHT +1 LN
/: BOX WIDTH '71.5' CH HEIGHT '40.87' LN FRAME 20 TW
/E SMALLFRAME
/: POSITION WINDOW
/: POSITION XORIGIN '-0.5' CH YORIGIN '-0.25' LN
/: SIZE WIDTH '+0.4' CH HEIGHT +1 LN
/: BOX WIDTH '71.5' CH HEIGHT '27.40' LN FRAME 20 TW

As you can see the question is that the flow of the program makes that sometimes i have both:
/: BOX WIDTH '71.5' CH HEIGHT '40.87' LN FRAME 20 TW
and
/: BOX WIDTH '71.5' CH HEIGHT '27.40' LN FRAME 20 TW

and i want to display

one or the other but not both

.

Best regards.

Read only

0 Likes
674

in the script you can add if statement as per your logic

/: IF &g_dif& EQ '7'

/: BOX WIDTH '71.5' CH HEIGHT '40.87' LN FRAME 20 TW

/: else

/: BOX WIDTH '71.5' CH HEIGHT '27.40' LN FRAME 20 TW

/: endif

cheers,

sasi

Read only

Former Member
0 Likes
675

Hi

Before the actual loop , please loop once on table i_PICK

and decide whether you want to print BIGFRAME / SMALLFRAME . I guess you are clear on what condition you want which frame . Proram cannot decide for you , you will have to buils a logic to decide .

Move this to a work area W_ELEMENT.

later in the loop use only this variable W_ELEMENT to either print BIG or SMALL Box.

Cheers .