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

sap script creating dynamic box problem

Former Member
0 Likes
813

Hi all,

I am unable to create dynamic box in sap script.

Because the printing lines in the main window changing from one customer to another customer.

So could you please guide me how to create a dynamic box in sap script and also how to know the printing line nunber in main window.

Advance thanks for your suggestion

Regards,

Sudhakar.

4 REPLIES 4
Read only

Former Member
0 Likes
516

To create the dynamic box in the MAIN window. Inside the window before the line items,

create a command in this format,

/: BOX WIDTH &WIDTH& CM HEIGHT &HEIGHT& CM FRAME 10 TW

chk this thread for more.

Read only

0 Likes
516

Hi ,

how will provide the values of height and width dynamically.

Regards

Sudhakar

Read only

Former Member
0 Likes
516

This message was moderated.

Read only

Former Member
0 Likes
516

In script form u can write following code

    
    /:       DEFINE &MY_XPOS& = ' '
    /:       DEFINE &MY_YPOS& = ' '
    /:       DEFINE &MY_HEIGHT& = ' '
    /:       DEFINE &MY_WIDTH& = ' '
    /:       PERFORM GET_BOX_SIZE IN PROGRAM Z_MY_PROG
    /:       CHANGING &MY_XPOS&
    /:       CHANGING &MY_YPOS&
    /:       CHANGING &MY_HEIGHT&
    /:       CHANGING &MY_WIDTH&
    /:       BOX XPOS '&MY_XPOS' MM  YPOS '&MY_YPOS' MM  HEIGHT '&MY_HEIGHT' MM WIDTH '&MY_WIDTH' MM INTENSITY 10 FRAME 0 TW

In report u can write following code


Form Get_Box_Size TABLES IN_PAR  STRUCTURE ITCSY
                         OUT_PAR STRUCTURE ITCSY.
     Loop at Out_Par.
          Case Out_Par-Name.
               When 'MY_XPOS'.
                     Out_Par-Value = 100.
               When 'MY_YPOS'.
                     Out_Par-Value = 57.
               When 'MY_HEIGHT'.
                     Out_Par-Value = 300.
               When 'MY_WIDTH'.
                     Out_Par-Value = 'Does it matter?'.

          EndCase.
          Modify Out_Par.
     EndLoop.
EndForm.