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

no output

Former Member
0 Likes
1,577

Hi!

The Main in my sap script form has the following entries:


/E   SHELEM                                                    
/:   &LV_S_VKORG&,,&LV_S_VTWEG&,,&LV_S_SPART&,,&LV_S_KUNNR&,,  
/:   &LV_S_NAME&,,&LV_S_CITY&&                                

My Form hasn't got an output. Does anyone has an idea

why ?

Regards

sas

FORM xyz.

DATA:
     lv_s_vkorg(4)  type c,
     lv_s_vtweg(2)  type c,
     lv_s_spart(2)  type c,
     lv_s_kunnr(10) type c,
     lv_s_name(10)  type c,
     lv_s_city(8)   type c.

LOOP AT gt_versand_plan INTO gw_versand_plan.

 IF gw_versand_plan-vkorg <> lv_s_vkorg.
lv_s_vkorg = gw_versand_plan-vkorg.
lv_s_vtweg = gw_versand_plan-vtweg.
lv_s_spart = gw_versand_plan-spart.

      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
        EXPORTING
          input  = gw_versand_plan-kunnr
        IMPORTING
          output = lv_kunnr.

lv_s_kunnr = lv_kunnr.
lv_s_name = 'Kundenname'. "gv_kun_nam.
lv_s_city = 'City'.     "gv_city.

CALL FUNCTION 'WRITE_FORM'

 EXPORTING
   ELEMENT                        = 'SHELEM'
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'MAIN' .
   
    ENDIF.
ENDLOOP.


CALL FUNCTION 'CLOSE_FORM'.

ENDFORM.

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
1,457

Are you using OPEN_FORM.

strat_form using this we can open many layoutses

open_form using this we can open the layout performance will be high

Open_form -- is used to initialize the spool request.

Start_form-- is used to initialize the layout.

1. Normally, START_FORM

is not required.

(OPEN_FORM Is compulary in all cases)

2. Its only required,

when we want to different sapscript layouts,

to get merged,

and come in one output.

3. For this purpose,

we use START_FORM,

to START layout 1,

then START Layout 2.

Regards,

Amit

Reward all helpful replies.

Hi!

The Main in my sap script form has the following entries:


/E   SHELEM                                                    
/:   &LV_S_VKORG&,,&LV_S_VTWEG&,,&LV_S_SPART&,,&LV_S_KUNNR&,,  
/:   &LV_S_NAME&,,&LV_S_CITY&&                                

My Form hasn't got an output. Does anyone has an idea

why ?

Regards

sas

FORM xyz.

DATA:
     lv_s_vkorg(4)  type c,
     lv_s_vtweg(2)  type c,
     lv_s_spart(2)  type c,
     lv_s_kunnr(10) type c,
     lv_s_name(10)  type c,
     lv_s_city(8)   type c.

LOOP AT gt_versand_plan INTO gw_versand_plan.

 IF gw_versand_plan-vkorg <> lv_s_vkorg.
lv_s_vkorg = gw_versand_plan-vkorg.
lv_s_vtweg = gw_versand_plan-vtweg.
lv_s_spart = gw_versand_plan-spart.

      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
        EXPORTING
          input  = gw_versand_plan-kunnr
        IMPORTING
          output = lv_kunnr.

lv_s_kunnr = lv_kunnr.
lv_s_name = 'Kundenname'. "gv_kun_nam.
lv_s_city = 'City'.     "gv_city.

CALL FUNCTION 'WRITE_FORM'

 EXPORTING
   ELEMENT                        = 'SHELEM'
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'MAIN' .
   
    ENDIF.
ENDLOOP.


CALL FUNCTION 'CLOSE_FORM'.

ENDFORM.

11 REPLIES 11
Read only

Former Member
0 Likes
1,457

Hi,

i think you have forgotten the

OPEN_FORM

reward points if helpful

regards,

venkatesh

Read only

Former Member
0 Likes
1,457

Hello erdem sas,

u hv not called CALL FUNCTION 'OPEN_FORM'

rEGARDS

Read only

Former Member
0 Likes
1,457

Hi,

Did u call the OPEN_FORM Function before using WRITE_FORM.

Regards,

Himanshu

Read only

amit_khare
Active Contributor
0 Likes
1,458

Are you using OPEN_FORM.

strat_form using this we can open many layoutses

open_form using this we can open the layout performance will be high

Open_form -- is used to initialize the spool request.

Start_form-- is used to initialize the layout.

1. Normally, START_FORM

is not required.

(OPEN_FORM Is compulary in all cases)

2. Its only required,

when we want to different sapscript layouts,

to get merged,

and come in one output.

3. For this purpose,

we use START_FORM,

to START layout 1,

then START Layout 2.

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
1,457

Hi

What and where is the link between the Program Code and the Script Layout.

You have to call the fun module <b>OPEN_FORM</b>

and have to give the Script layout name in that

then only the program will call the script

otherwise how your program will recognize the fields and display

so call OPEN_FORM, Write_form and CLOSE_FORM in code and use

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
1,457

I'm sorry I have forgotten to psot this part. Of course I have an open form.

Nevertheless I have the same situation

FORM xyz*MESSAGE I000(38) WITH 'Hallo'.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

DEVICE = 'PRINTER'

FORM = 'ZSD_PACKING_LIST'

LANGUAGE = SY-LANGU .

Read only

Former Member
0 Likes
1,457

hi,

In script <b>/:</b> is for commands, not for displaying output.

Sudheer.A

Message was edited by:

sudheer Addepalli

Read only

Former Member
0 Likes
1,457

Yes sudheer is right!!

create a paragraph formats and give that instead of /:

/E SHELEM

<b>/P</b> &LV_S_VKORG&,,&LV_S_VTWEG&,,&LV_S_SPART&,,&LV_S_KUNNR&,,

<b>/P</b> &LV_S_NAME&,,&LV_S_CITY&&

Read only

Former Member
0 Likes
1,457

HELLO OK

BUT WHICH command IS FOR displaying ?

regards

sas

Read only

Former Member
0 Likes
1,457

Hello All,

I get the error message within the sap script check

&LV_S_VKORG&

Unknown symbol LV_S_VKORG

What has to be done ?

Reagrds

sas

Read only

0 Likes
1,457

Hi,

Just define a Paragraph formate and do not opt anything in that and use that name in place of <b> /:</b> - will solve ur problem.

Sudheer.a