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

issues...

Former Member
0 Likes
630

Hi ,

few of my doubts

1) i am in the 5th secondary list how can i go to 3rd secondary list list directly.

2) how to create a list of possible input values for an input field on the selection screen.

2) how to create a push button on an application tool bar and also on the selection-screen.

4) how to write text in the selection screen.

5) wht is the table created when we use selet-options

6) what is sap-script-subrc sapscript-formpages sapscript-jobpages

7) how to change the devlopment class of a script

suppose i m in 2nd secondary list , how can i go to 5th secondary list directl how

😎

how many pages can we generate in sapscripts

thankig u all.

regards,

satish

1 ACCEPTED SOLUTION
Read only

gopi_narendra
Active Contributor
0 Likes
595

1. sy-lsind

7. goto SE03

ObjectDirectory - > Change Object Directory Entries

under that give FORM and FORMName

and select the check box and press F8.

now clk on Object Directory and change the Dev Class

Regards

Gopi

6 REPLIES 6
Read only

Former Member
0 Likes
595

Hi frnds,

any help regarding this frnds. i m in need of few answers.

thanking u all.

regards,

satish

Read only

0 Likes
595

Hi gopi thnks for ur reply.

any more answers plz.

regards,

satish

Read only

gopi_narendra
Active Contributor
0 Likes
596

1. sy-lsind

7. goto SE03

ObjectDirectory - > Change Object Directory Entries

under that give FORM and FORMName

and select the check box and press F8.

now clk on Object Directory and change the Dev Class

Regards

Gopi

Read only

Former Member
0 Likes
595

Satish,

1. IF SY-LSIND = 5.

SY-LSIND = 3.

Endif.

For more clarification run the below code.

***************************************************

DATA: l TYPE i, t(1) TYPE c.

DO 100 TIMES.

WRITE: / 'Loop Pass:', sy-index.

ENDDO.

TOP-OF-PAGE.

WRITE: 'Basic List, Page', sy-pagno.

ULINE.

TOP-OF-PAGE DURING LINE-SELECTION.

WRITE 'Secondary List'.

ULINE.

AT LINE-SELECTION.

DESCRIBE FIELD sy-lisel LENGTH l IN CHARACTER MODE

TYPE t.

WRITE: 'SY-LSIND:', sy-lsind,

/ 'SY-LISTI:', sy-listi,

/ 'SY-LILLI:', sy-lilli,

/ 'SY-CUROW:', sy-curow,

/ 'SY-CUCOL:', sy-cucol,

/ 'SY-CPAGE:', sy-cpage,

/ 'SY-STARO:', sy-staro,

/ 'SY-LISEL:', 'Length =', l, 'Type =', t,

/ sy-lisel.

IF SY-LSIND = 15.

SY-LSIND = 5.

ENDIF.

WRITE: 'SY-LSIND:', sy-lsind,

/ 'SY-LISTI:', sy-listi,

/ 'SY-LILLI:', sy-lilli,

/ 'SY-CUROW:', sy-curow,

/ 'SY-CUCOL:', sy-cucol,

/ 'SY-CPAGE:', sy-cpage,

/ 'SY-STARO:', sy-staro,

/ 'SY-LISEL:', 'Length =', l, 'Type =', t,

/ sy-lisel.

****************************************************

2. First declare

TYPE-POOLS vrm.

DATA : list TYPE vrm_values,

value LIKE LINE OF list.

PARAMETERS : p_npgrp(2) AS LISTBOX VISIBLE LENGTH 5,

p_nowsh(2) AS LISTBOX VISIBLE LENGTH 5.

****Write this coding under at selection screen output event

Passing the values to the list.

name1 = 'p_nowsh'.

value-key = 'XXXXX' .

APPEND value TO list1.

Clear value.

value-key = 'YYYY' .

APPEND value TO list1.

Clear value.

value-key = 'ZZZZ'.

APPEND value TO list1.

Clear value.

value-key = 'AAAA' .

APPEND value TO list1.

Clear value.

value-key = 'BBBB'.

APPEND value TO list1.

Clear value.

IF v_num eq 0.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = name1

VALUES = list1

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

3. see the docu.

To create a pushbutton on the selection screen, you use:

SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>

USER-COMMAND <ucom> [MODIF ID <key>].

The [/]<pos(len)> parameters and the MODIF IF addition have the same function as for the formatting options for underlines and comments.

<push> determines the pushbutton text. For <push>, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length <len>. The field must be filled before the selection screen is called.

For <ucom>, you must specify a code of up to four characters. When the user clicks the pushbutton on the selection screen, <ucom> is entered in the UCOMM of the SSCRFIELDS interface work area. You must use the TABLES statement to declare the SSCRFIELDS structure. The contents of the SSCRFIELDS-UCOMM field can be processed during the AT SELECTION-SCREEN event.

REPORT DEMO.

TABLES SSCRFIELDS.

DATA FLAG.

SELECTION-SCREEN:

BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,

BEGIN OF LINE,

PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,

PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,

END OF LINE,

BEGIN OF LINE,

PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,

PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,

END OF LINE,

END OF SCREEN 500.

AT SELECTION-SCREEN.

CASE SSCRFIELDS.

WHEN 'CLI1'.

FLAG = '1'.

WHEN 'CLI2'.

FLAG = '2'.

WHEN 'CLI3'.

FLAG = '3'.

WHEN 'CLI4'.

FLAG = '4'.

ENDCASE.

START-OF-SELECTION.

TIT = 'Four Buttons'.

BUT1 = 'Button 1'.

BUT3 = 'Button 3'.

CALL SELECTION-SCREEN 500 STARTING AT 10 10.

CASE FLAG.

WHEN '1'.

WRITE / 'Button 1 was clicked'.

WHEN '2'.

WRITE / 'Button 2 was clicked'.

WHEN '3'.

WRITE / 'Button 3 was clicked'.

WHEN '4'.

WRITE / 'Button 4 was clicked'.

WHEN OTHERS.

WRITE / 'No Button was clicked'.

ENDCASE.

4.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 5(63) 'TEXT 1'.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 10(63) 'TEXT2'.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 12(63) text-005.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 5(63) text-001.

SELECTION-SCREEN END OF LINE.

5.When we use select options no table will create.

Properties of selection screens will be in "SCREEN" table.

6. &sapscript-formpages& prints the no of pages written to the form

&sapscript-jobpages& prints the no of pages written to the spool list

&page& prints the current page no

7. goto SE03

ObjectDirectory - > Change Object Directory Entries

under that give FORM and FORMName

and select the check box and press F8.

now clk on Object Directory and change the Dev Class

8.IF SY-LSIND = 2.

SY-LSIND = 5.

Endif.

9.You can create as many as you want, but is recommended to use the first and the second. It will be easier to work on it. In case you need more there is no problem.

Don't forget to reward if useful.

Read only

0 Likes
595

hi,

--> suppose i m in 2nd secondary list , how can i go to 5th secondary list directl how

forward navigation in secondary lists is not possible...i.e. you can come from a higher level list to lower level, but not vice versa...even if you set

if sy-lsind = 2.

sy-lsind = 5.

it will go to the immediate next higher level of list only

if helpful, reward,

Sathish. R

Read only

Former Member
0 Likes
595

hi

--->how to create a push button on an application tool bar and also on the selection-screen.

u can create push button on application toolbar by setting the PF status.

goto se41(menupainter) and add a button .

on selection-screen

selection-screen pushbutton <label> usercommand <ucomm>.

to write text on selection screen:

SELECTION-SCREEN COMMENT 10(20) TEXT-001.

PARAMETERS PARM LIKE SAPLANE-PLANETYPE.//to display selection screen.

the table created when v use select options:

its like an internal table with select options name as table name

fields:

sign --->either include or exclude

option --->like between ,eq ne

low --->lower limit value

high --->higher limit value.

sapscript subrc --->Return code in SAPscript texts

jobpages--->Total number of pages of the print job

form pages-->Total number of pages of the current form

Message was edited by:

Premalatha G