cancel
Showing results for 
Search instead for 
Did you mean: 

load progrm not found

Former Member
0 Kudos

hi friends i am calling a smartform from a program bt facing run time error that "load_program_not_found"

I have designed my smarform according to the steps givn in a questin in this forum:

plz help me how to solve

Edited by: achalmehra on Mar 5, 2010 8:20 AM

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi ,

Please post your code .

Let me know if any concerns....

Former Member
0 Kudos

hi lokservna

i am using the same code posted by me last on this forum question on page 2.

Edited by: achalmehra on Mar 8, 2010 8:16 AM

Former Member
0 Kudos

hi

Utilities-->Field List on/off(ctrlshiftf4)

Lisf of field name will come(as per internal table itab-ebelp or wa-ebelp)

Select the (EBELN,EBELP) drag and drop it in table(text)

Former Member
0 Kudos
CALL FUNCTION '/1BCDWB/SF00000033'. *<<<<<<<<<<<<<* 
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING....

This must be a typo....You're not really doing the call FM before you get the FM name for the form, right?

The answers are correct, I think....first we get the function module name for the form name and then we call that FM to output the form.

Former Member
0 Kudos

hi,

First check form ZSMARTTEST is activated properly.Then get FM name related to FORM using ENVORMENT-> FM NAME menu in

SMARTFORMS transaction.

then in the code.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSMARTTEST'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

IF sy-subrc 0.

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

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

ENDIF.

use pattern button in se38 and place the FM name in call function so that you will get import / export parameters.

then replace FM name with variable fm_name like mentioned below.

call function fm_name .

"Exporting

" salary = g_salary

TABLES

ITAB1 = ITAB1

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5 .

IF SY-SUBRC 0.

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

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

ENDIF.

Regards,

shanmugavel Chandrasekaran

Edited by: shanmugavel chandrasekaran on Mar 5, 2010 12:16 PM

Former Member
0 Kudos

hi

Check the form ZSMARTTEST and excute it.

Debug the program and find where the error is coming.

Former Member
0 Kudos

hi shanmugavel as per your answer i have changed my code and stilll having the same error.

1) i have now activated the smartform also

2) the table used in form interface is : itab like EKPO and not itab1.

new code i am using is :

Tables ekpo.
data :fm_name TYPE rs38l_fnam.


Data: itab like ekpo occurs 0 with header line.
select * into table itab from ekpo.



CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTTEST'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

CALL FUNCTION fm_name              " '/1BCDWB/SF00000034'
* EXPORTING
*   ARCHIVE_INDEX              =
*   ARCHIVE_INDEX_TAB          =
*   ARCHIVE_PARAMETERS         =
*   CONTROL_PARAMETERS         =
*   MAIL_APPL_OBJ              =
*   MAIL_RECIPIENT             =
*   MAIL_SENDER                =
*   OUTPUT_OPTIONS             =
*   USER_SETTINGS              = 'X'
* IMPORTING
*   DOCUMENT_OUTPUT_INFO       =
*   JOB_OUTPUT_INFO            =
*   JOB_OUTPUT_OPTIONS         =
  TABLES
    ITAB                       = itab
* EXCEPTIONS
*   FORMATTING_ERROR           = 1
*   INTERNAL_ERROR             = 2
*   SEND_ERROR                 = 3
*   USER_CANCELED              = 4
*   OTHERS                     = 5
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Sandra_Rossi
Active Contributor
0 Kudos

Could you paste the dump up to "error analysis" section included. Thx.

Former Member
0 Kudos

hi sandara....i don't know now i have again used the same code posted by me above your post.it is working now.I dn't know the reason but its working

Former Member
0 Kudos

the only thing noticsable now is that only PO no. is displayed.But in smartform under table i have created three text fields for :

EBELN

EBELP

WA_NETPR (where wa_netpr = ITAB-NETPR in code lines)

Former Member
0 Kudos
call function fm_name " --->here dont mention FM name
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5 .


IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Former Member
0 Kudos

hi

Chang it .

call function fm_name  --->Here Dont mention the Function module no
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5 .

IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Former Member
0 Kudos

Hi ,

I think your calling the smartforms generated function module in this way

CALL FUNCTION '/1BCDWB/SF00000033'.

Am i right ?

Try this ....

Call the amsrtform generated function module with the variable that contains the function module name

in this way

CALL FUNCTION fm_name.

Because of smartform generated function module will be vary in dev QTY & Production

Let me know if any concerns......

Former Member
0 Kudos

hi lokserverna.....

yes that is the name of functin module from smartform.i have changed the whole program :

REPORT  ZTESTSMART.
Tables ekpo.
data :fm_name TYPE rs38l_fnam.
fm_name = '/1BCDWB/SF00000033'.
Data: itab1 like ekpo occurs 0 with header line.
select * into table itab1 from ekpo.






CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTTEST'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

call function fm_name " ' /1BCDWB/SF00000033'
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5 .


IF SY-SUBRC = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

still the same error

Former Member
0 Kudos

Hi ,

Check the underline text over here

REPORT ZTESTSMART.

Tables ekpo.

data :fm_name TYPE rs38l_fnam.

fm_name = '/1BCDWB/SF00000033'. " Dont assign this with hard code (Remove this and try it )

Data: itab1 like ekpo occurs 0 with header line.

select * into table itab1 from ekpo.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSMARTTEST'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

IF sy-subrc = 0.

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

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

ENDIF.

call function fm_name " ' /1BCDWB/SF00000033'

"Exporting

" salary = g_salary

TABLES

ITAB1 = ITAB1

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5 .

IF SY-SUBRC = 0.

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

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

ENDIF.

Former Member
0 Kudos

hi

just remove this line or comment it try again

fm_name = '/1BCDWB/SF00000033'.

[Smartform Sample Tutorials|http://wiki.sdn.sap.com/wiki/display/ABAP/LearnmakingFirstSmartformStepbyStep]

Former Member
0 Kudos

hi friend

i have removed this line from code :

fm_name = '/1BCDWB/SF00000033'.

still having the same error

Former Member
0 Kudos

hi

put the break point and debug the program.

fm_name is populating correct value or not and also check the Smartform impoert/export/table you are callin correctly or not..

Former Member
0 Kudos

hi dharam raj,

i have not written any table name in import/export in smartform.actually i was just following the steps specified in a tutorial for beginner in this forum.I have given the link of that above.

should i specify any table name in import or export fields in smartform

Former Member
0 Kudos

Hi ,

As per your CODE last posting

call function fm_name " ' /1BCDWB/SF00000033'

"Exporting

" salary = g_salary

TABLES

ITAB1 = ITAB1

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5 .

IF SY-SUBRC = 0.

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

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

ENDIF.

your are passing the ITAB1 to smartform

Check that internal table is defined in the smartform are not

other wise comment that TABLE Parameter

TABLES

ITAB1 = ITAB1

Hope you resolve your issue

Let me know if any concerns....

Former Member
0 Kudos

my program is :

REPORT  ZTESTSMART.
Tables ekpo.
data :fm_name TYPE rs38l_fnam.
Data: itab1 like ekpo occurs 0 with header line.
select * into table itab1 from ekpo.




CALL FUNCTION '/1BCDWB/SF00000033'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname                 = 'ZSMARTTEST'
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
 IMPORTING
   FM_NAME                  = fm_name
 EXCEPTIONS
   NO_FORM                  = 1
   NO_FUNCTION_MODULE       = 2
   OTHERS                   = 3
          .
IF sy-subrc <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

call function '/1BCDWB/SF00000033'
  "Exporting
   "  salary = g_salary
  TABLES
     ITAB1 = ITAB1
  EXCEPTIONS
    FORMATTING_ERROR           = 1
    INTERNAL_ERROR             = 2
    SEND_ERROR                 = 3
    USER_CANCELED              = 4
    OTHERS                     = 5           .

 IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
 ENDIF.

Former Member
0 Kudos

Hi,

Use this way

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSMARTTEST'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

IF sy-subrc 0.

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

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

ENDIF.

call function fm_name " ' /1BCDWB/SF00000033'

"Exporting

" salary = g_salary

TABLES

ITAB1 = ITAB1

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5 .

IF SY-SUBRC 0.

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

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

ENDIF.

Thanks

Chinni