Runtime error in SmartForm
I am having a problem with an error message in a SmartForm. I have tracked the error down to the following function call:
CALL FUNCTION 'SSFCOMP_PROCESS_DOCUMENT'
EXPORTING HEADER = %HEADER
DOCSTRUC = %DOCSTRUC
STARTPAGE = CONTROL_PARAMETERS-STARTPAGE
ARCHIV_INDEX_TAB = %ARCTAB
MAIL_APPL_OBJECT = MAIL_APPL_OBJ
IMPORTING RESULT = %RESULT_PD
EXCEPTIONS OTHERS = 1.
IF SY-SUBRC <> 0. PERFORM %RAISE. ENDIF.
It is returning with a value, in sy-subrc, of 1. This function call is after an included text is displayed. I have the checkbox "No error if no text exists" checked so I am not sure why I am getting an error. The error message is as follows:
Field ULINE does not exist in form.
I am not using ULINE at all in the form (as the error message states) but I don't understand why/where it is looking for ULINE.
Regards,
Davis
Hello Aaron,
I have a query similar to your original post but don't know exactly how to proceed.
When i am trying to issue Delivery output for T code VL02N after selecting Output type e.g. 'ZABC'
and then selecting print preview, it gives following error.Please see the screen shot :
I have checked the driver program as well as smart form thoroughly , wa_name has not been declared any where.
I tracked down the place of error and it coming from FM 'SSFCOMP_PROCESS_DOCUMENT'
CALL FUNCTION 'SSFCOMP_PROCESS_DOCUMENT'
EXPORTING HEADER = %HEADER
DOCSTRUC = %DOCSTRUC
STARTPAGE = CONTROL_PARAMETERS-STARTPAGE
ARCHIV_INDEX_TAB = %ARCTAB
MAIL_APPL_OBJECT = MAIL_APPL_OBJ
IMPORTING RESULT = %RESULT_PD
EXCEPTIONS OTHERS = 1.
IF SY-SUBRC <> 0. PERFORM %RAISE. ENDIF.
DOCUMENT_OUTPUT_INFO = %RESULT_PD.
SY-SUBRC becomes 1, consequently it raises that error using subroutine %RAISE.
Dont know how to track down the error, please let me know the solution to eliminate this.
Best Regards.
Saurabh Singh
Similar Messages
-
Getting Runtime errors for smartforms in Quality.
| The function module " " is called,
| but cannot be found in the library.
|
| Error in the ABAP Application Program
|
| The current ABAP program "ZMMRFQ_SERVICE" had to be terminated because it has
| come across a statement that unfortunately cannot be executed.
653| SELECT SINGLE bedat FROM ekko INTO edate WHERE ebeln = p_ebeln.
| 654|ENDFORM. " get_data
| 663|FORM smartform . |
| 664| CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' |
| 665| EXPORTING |
| 666| formname = 'ZMM_RFQ_SERVICE' |
| 667|* VARIANT = ' ' |
| 668|* DIRECT_CALL = ' ' |
| 669| IMPORTING |
| 670| fm_name = fm_name |
| 671| EXCEPTIONS |
| 672| no_form = 1 |
| 673| no_function_module = 2 |
| 674| OTHERS = 3. |
| 675| |
| 676| IF sy-subrc <> 0. |
| 677| WRITE: / 'ERROR 1'. |
| 678|* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO |
| 679|* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. |
| 680| ENDIF. |
| 681| |
| 682|*loop at t_final. |
|>>>>>| CALL FUNCTION fm_name |
| 684| EXPORTING |
| 685| |
| 686| |
| 687| control_parameters = control |
| 688| output_options = output_options |
| 689| user_settings = space "'X' |
| 690| |
| 691|* sum = sum |
| 692| |
| 693|* bdoc = bdoc |
| 694| |
| 695|* l_tlines1 = l_tlines1 |
| 696|* l_tlines2 = l_tlines2 |
| 697| |
| 698|* l_tlines3 = l_tlines3 |
| 699|* |
| 700|* l_tlines4 = l_tlines4 |
| 701|* |
| 702|* l_tlines5 = l_tlines5 |
Any kind of help or inputs will be appreciated.
Regards,
Abhinab Mishra
Edited by: Abhinab Mishra on Sep 4, 2009 2:52 PMHi,
put a break point at FM 'SSF_FUNCTION_MODULE_NAME' and check what is the value you are gettting in variable fm_name, then go to SE37 and check the FM name in fm_name is available or not..
Hope it helps!!
Rgds,
Pavan -
Hi,
i have made a forms whch i exesute it gave me error.FORMATIN_ERROR SSFCOMPOSER MESSAGENUMBER:181
No other column available (see long text).
i have created a table in the smart form,after defining the values of that TABLE.i got 5 extra CELL and i have only defing 6.
Which mean total 11 CELLS were created and i only created 6 of them.
Kindly identified my mistake.
Thanks.Hi,
Put a break point at CALL FUNCTION 'SMARTFORM NAME'
and do F6 there and if Sy-subrc = 1 implies you are having formatting error. Refer the exact error (This will come in internal table) and try to increase the space allocated for cells.
Also ensure that window size is wider than table width and in case of template the window should be longer and wider than template.
Thanks
Preyansh -
Runtime error in executing smartform
Hi,
I am working on smartform and its abap code in which i am getting runtime error :-
In the function "/1BCDWB/SF00000004", the STRUCTURE parameter "ITEM" is typed
in such a way
that only actual parameters are allowed, which are compatible in Unicode
with respect to the fragment view. However, the specified actual
parameter "ITEM_FINAL1" has an incompatible fragment view.
Here,item and item_final1(with header line) are the internal tables. plzz provide me guidelines for solvig this problem.
Edited by: ricx .s on Jan 16, 2009 6:24 AMhi,
i had declared the ITEM and ITEM_FINAL1 AS :-
DATA : BEGIN OF item OCCURS 0,
ebelp LIKE ekpo-ebelp,
txz01 LIKE ekpo-txz01,
cc LIKE cacns_general-reserve3,
eindt LIKE eket-eindt,
menge LIKE ekpo-menge,
rate LIKE konv-kbetr,
rate1 LIKE konv-kbetr, " NEW ZING
rate2 LIKE konv-kbetr, " NEW ZGRD
rate3 LIKE konv-kbetr, " NEW ZBDL
disc LIKE konv-kbetr,
ed LIKE konp-kbetr,
ed1 LIKE konp-kbetr,"NEW
ed2 LIKE konp-kbetr,"NEW
tax LIKE konp-kbetr,
cutc LIKE konv-kbetr,
pf LIKE konv-kbetr,
insurance LIKE konv-kbetr,
frt LIKE konv-kbetr,
inst LIKE konv-kbetr,
octroi LIKE konv-kbetr,
knumh LIKE konh-knumh,"NEW
matnr LIKE ekpo-matnr,"NEW
vakey LIKE konh-vakey,"NEW
total LIKE konv-kbetr,
mtart LIKE ekpo-mtart,
bwtar LIKE ekpo-bwtar,
knttp LIKE ekpo-knttp,
meins LIKE ekpo-meins,
END OF item.
DATA : item_final1 LIKE item OCCURS 0 WITH HEADER LINE.
here's d code of the form :-
CALL FUNCTION form_name
EXPORTING
control_parameters = t_control_parameters
output_options = t_output_options
user_settings = 'X'
vknumv = vknumv
vtex = vtex
vebeln = vebeln
vkwert = vkwert
TABLES
header = header
item = item_final1
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.
IN the smartform i had declared it as it was in the declaration of the internal table(ITEM).
I -
Getting Runtime error while adding Second page in Smartform.
I added 2 pages in smartform. When I worked with single page. smartform working properly. Now I added one more page(i.e Second page) I am getting runtime error. ("The current ABAP/4 program encountered an unexpected
situation". A RAISE statement in the program "SAPLSTXBC" raised the exception
condition "ERROR".) When I debug this standard program Something width problem getting on line number 110. Both width not matched so program raising exception. Can you please tell me to solve this problem what changes will I do in my smartform?Please let me know the details of each page.
Error can occur in these cases.
1) You copied the first page to second. and later you change the width of second page
2) You created the second page and there is template in second page. each column width is not matching with the total width of the template.
3) windows width is greater than the page width
Please have a look.
Regards,
Nikhil
Edited by: Nikhil V Kumar on Jul 27, 2010 12:16 PM -
Runtime error in print program of a smartform
Hi,
While trying to execute the print program of a smartform I am getting the following runtime error.
The reason for the exception is:
The call to the function module "/1BCDWB/SF00000288" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "IT_BOOKINGS".
Although the currently specified field
"IT_BOOKINGS" is the correct type, its length is incorrect.
In the form interface of the smartform under tables parameters I have declared like this.
IT_BOOKINGS LIKE SBOOK
IT_SCHEDULE LIKE SPFLI
Can anyone tell me why do we get this error?
Regards,
HemaHello,
program to call smartform is really simple :
-> function SSF_FUNCTION_MODULE_NAME give you the name of the function link to your sapscript.
-> function WFMC_PREPARE_SMART_FORM help your to prepare your options to your smartform.
-> function xxx to call your smartform (find with the first function).
Sometimes you have to play with values of NAST (for ex) to find the language (set in control_parameters) or for example if you want to print without display (when it ask you for print / print preview and the name of the print device) .....
Frédéric -
hi,
when i am executing the smartform a runtime error is raised in function module
SSFCOMP_GENERATE_SMART_FORM and the error is err_comp ssf_err_main_width_changed 'A' 080 can anyone tell what is the error its throwing ?Hi harri kishan,
As shivkumar said. All the main windows of pages should have the same width. If width varies, then form will got dump. So make sure all the main windows should have the same measurements.
Award points if its useful to you. Feel free to contact me.
Regards
Sreenivasa sharma k. -
Runtime error when executing smartform in se38
hi,
i designed a smartform but when iam executing that using se38 am gettin runtime error.can anybody plz help me.
*& Report ZDEMOPRG
REPORT ZDEMOPRG.
DATA FNAME(30) TYPE C.
TABLES: LFA1.
DATA: BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE LFA1.
DATA: END OF ITAB.
SELECT-OPTIONS S_KUNNR FOR LFA1-KUNNR MEMORY ID 001.
SELECT * FROM LFA1 WHERE KUNNR IN S_KUNNR.
MOVE-CORRESPONDING LFA1 TO ITAB..
APPEND ITAB.
ENDSELECT.
CALL FUNCTION '/1BCDWB/SF00000006'
EXPORTING
FORMNAME = 'ZEXM_SMART'
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.
plz help me
thanks
sudheerHi,
Try this and reward points by clicking the star on the left of reply,if it helps.
data: form_name type tdsfname value 'ZEXM_SMART'.
data: fm_name type rs38l_fnam.
TABLES: LFA1.
DATA: BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE LFA1.
DATA: END OF ITAB.
SELECT-OPTIONS S_KUNNR FOR LFA1-KUNNR MEMORY ID 001.
SELECT * FROM LFA1 WHERE KUNNR IN S_KUNNR.
MOVE-CORRESPONDING LFA1 TO ITAB..
APPEND ITAB.
ENDSELECT.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = form_name
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
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.
endloop. -
Runtime Error for the Picking List Smartform
Hi All,
I am working on the smartform, used for GI Scrapping for 551 Movement type. The requirement is they need DEA number for the Plant. I have written code for getting the DEA number. Iacivated the form and I want to print it using the TCODE MB02.
I get the runtime error saying UPDATE TERMINATED.I saw Dump Analysis it says CALL_FUNCTION_PARM_MISSING. It says IS_ADRC is the parameter. The ABAP program is the include program /SMB40/M07DRSON. This show the function module lf_fname with out passing the parameter IS_ADRC. How can I change the program. This is Standard program.
Thanks,Then the smart form interface in the transaction SMARTFORMS you have to remove the parameter IS_ADRC. As the calling program will not automatically add the parameters if you add it in the smartforms...
If you want the values from the table ADRC..you can write subroutines in the INITIALIZATION to get the values...
Thanks,
Naren -
HI experts ,
I have smartforms for Stock Report. and respective selection screen in se38. while executing its shows Below runtime error.
Runtime Errors CALL_FUNCTION_CONFLICT_LENG
Exceptn CX_SY_DYN_CALL_ILLEGAL_TYPE
Date and Time 07.07.2007 16:15:34
ShrtText
Type conflict when calling a function module (field length).
What happened?
Error in ABAP application program.
The current ABAP program "ZSTOCK_TR" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
A function module was called incorrectly.
Error analysis
An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught, which
led to a runtime error. The reason for this exception is:
The call to the function module "/1BCDWB/SF00000017" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "GT_STRUCT".
Although the currently specified field
"GT_STRUCT2" is the correct type, its length is incorrect.
Source Code Extract
Line SourceCde
304
305 SELECT stceg into ITAB0-stceg FROM kna1 WHERE KUNNR = VKUNNR.
306 APPEND ITAB0.
307 ENDSELECT.
308
309 select vgbel from lips into itab0-ponum where vbeln in vbeln.
310 append itab0.
311 endselect.
312 DATA : LINES TYPE STANDARD TABLE OF TLINE WITH HEADER LINE.
313
314 ***************************************************************
315
316 CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
317 EXPORTING
318 FORMNAME = 'Z_STOCK_TR'
319 * VARIANT = ' '
320 * DIRECT_CALL = ' '
321 IMPORTING
322 FM_NAME = gv_fname
323 * EXCEPTIONS
324 * NO_FORM = 1
325 * NO_FUNCTION_MODULE = 2
326 * OTHERS = 3
327 .
328 IF SY-SUBRC <> 0.
329 * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
330 * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
331 ENDIF.
332
333
>334 CALL FUNCTION gv_fname
335 exporting
336 * ARCHIVE_INDEX =
337 * ARCHIVE_INDEX_TAB =
338 * ARCHIVE_PARAMETERS =
339 * CONTROL_PARAMETERS =
340 * MAIL_APPL_OBJ =
341 * MAIL_RECIPIENT =
342 * MAIL_SENDER =
343 * OUTPUT_OPTIONS =
344 * USER_SETTINGS = 'X'
345 plant = plant
346 * vbeln = exc_inv
347 * srdoc = srdoc-low
348 * vexdat = vexdat
349 * vrdoc = vrdoc
350 * ptotal = ptotal
351 * line1 = line1
352 * fkwert = fkwert
353 * ikwert = ikwert
Plz help. Thanks alot.
Khan.Hi
I think u have not called Function module properly
check this sample code
Tables : sflight.
Data : fm_name TYPE rs38l_fnam.
*data : Begin of it_flttab occurs 0,
* carrid type sflight-carrid,
* connid type sflight-connid,
* fldate type sflight-fldate,
* seatsmax type sflight-seatsmax,
* seatsocc type sflight-seatsocc,
* End of it_flttab.
data : it_flttab like table of sflight.
Data : g_salary type i .
* it_flttab type standard table of ty_flt.
g_salary = 1000.
select carrid connid fldate seatsmax seatsocc from sflight into
corresponding fields of table it_flttab.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZTACA_SMFORM2'
* 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
Exporting
salary = g_salary
TABLES
it_flttab = it_flttab
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.
<b>2nd code</b>
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
* At the end of your program.
* Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
* 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
GS_MKPF = INT_MKPF
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.
Reward all helpfull answers
Regards
Pavan -
Runtime Error when trying to trigger smartform from VL03N
Hi all,
i am having a runtime error while trying to triger my smartforms from transaction VL03N.
The error is 'The current ABAP program "SAPLV60U" had to be terminated because it has come across a statement that unfortunately cannot be executed.'
The it's in the include: "LV60UF0K"
| 21| LOOP AT XKOMV.
| 22| KONV = XKOMV.
| 23| BELEG = XKOMV-KNUMV.
| 24| IF BELEG-ID = '$'.
| 25| PERFORM VBRK_BELEGNUMMER_ERMITTELN.
| 26| XKOMV-KNUMV = XVBRK-KNUMV.
| 27| ENDIF.
| 28| MODIFY XKOMV.
| 29| ENDLOOP.
|>>>>>| INSERT KONV FROM TABLE XKOMV.
| 31| IF SY-SUBRC NE 0.
| 32| MESSAGE A100 WITH 'KONV' SY-SUBRC XKOMV-knumv.
| 33| ENDIF.
can anyone help me on this please..
Thanks in advance
Regards
NitinThis looks like standard SAP code, your best bet is to log this as a problem on service.sap.com
Regards,
Nick -
Runtime error when executing driver program
when im executing my report after passing smartform to it , by giving invoice number in selectionscreen,it's generating runtime error as
the call to the function module '/1BCDWB/SF00000032' is incorrect:
in the function module interface, u can only specify fields of a specific type and
length under "s_final".although the currently specified field " " is the correct type,
it's length is incorrect.
i declared s_final in forminterface->tables as s_final like zform1.
i defined zform1 with fields which are in t_final.
please suggest where im going wrong.
TYPES : BEGIN OF TY_FINAL,
VBELN TYPE VBRP-VBELN,"INVOICE NO
ADRNR TYPE KNA1-ADRNR, "ADDRESS FOR CONSIGNEE
BSTKD TYPE VBKD-BSTKD, "PO NUMBER
BSTDK TYPE VBKD-BSTDK, "PO DATE
ARKTX TYPE VBRP-ARKTX, "DESCRITION
PACK TYPE I, "NO OF PACKAGES
UMREZ TYPE SMEINH-UMREZ, "AVG. CONTENTS PER PACKAGE IN KGS
FKIMG TYPE VBRP-FKIMG, "TOTAL QTY IN KGS
KNUMV TYPE KONV-KNUMV,
KBETR TYPE KONV-KBETR, "SELLING RATE/KG
KBETR1 TYPE KONV-KBETR,
KWERT TYPE KONV-KWERT,
TARIFF TYPE ZFORM1-TARIFF,
DUTY TYPE ZFORM1-DUTY,
AMOUNT TYPE ZFORM1-AMOUNT,
END OF TY_FINAL.
TYPES : BEGIN OF TY_ITEM,
VBELN TYPE VBRP-VBELN,"INVOICE NO
POSNR TYPE VBRP-POSNR,
ARKTX TYPE VBRP-ARKTX, "DESCRITION
FKIMG TYPE VBRP-FKIMG, "TOTAL QTY IN KGS
BSTKD TYPE VBKD-BSTKD, "PO NUMBER
BSTDK TYPE VBKD-BSTDK, "PO DATE
AUBEL TYPE VBRP-AUBEL,
AUPOS TYPE VBRP-AUPOS,
END OF TY_ITEM.
DATA : FM_NAM TYPE RS38L_FNAM VALUE '/1BCDWB/SF00000032'.
DATA :IT_ITEM TYPE TABLE OF TY_ITEM,
W_ITEM TYPE TY_ITEM,
W_FINAL TYPE TY_FINAL,
T_FINAL TYPE TABLE OF TY_FINAL,
P TYPE I VALUE 250, "total quantity.
TOTALDUTY TYPE I VALUE 0,
CESS TYPE I,
EDCESS TYPE I,
VAT TYPE I,
FREIGHT TYPE I,
GROSSTOTAL TYPE I,
TOTAL TYPE I,
PONUMBER TYPE VBKD-BSTKD, "PO NUMBER
PODATE TYPE VBKD-BSTDK, "PO DATE
ZTERM TYPE VBKD-ZTERM, "PAYMENT TERMS
INVOICENO TYPE VBRP-VBELN.
PARAMETERS : XVBELN TYPE VBELN.
SELECT VBELN
POSNR
ARKTX
FKIMG
AUBEL
AUPOS
FROM VBRP
INTO CORRESPONDING FIELDS OF TABLE IT_ITEM
WHERE VBELN = XVBELN AND UEPOS = '000000'.
LOOP AT IT_ITEM INTO W_ITEM.
*INVOICE NO
MOVE W_ITEM-VBELN TO INVOICENO.
*DESCRIPTION
MOVE W_ITEM-ARKTX TO W_FINAL-ARKTX.
**TOTAL QUANTITY IN KGS
MOVE W_ITEM-FKIMG TO W_FINAL-FKIMG.
*PO NUMBER
SELECT SINGLE BSTKD FROM VBKD
INTO W_ITEM-BSTKD
WHERE VBELN EQ W_ITEM-AUBEL.
MOVE W_ITEM-BSTKD TO PONUMBER.
*PO DATE
SELECT SINGLE BSTDK FROM VBKD
INTO W_ITEM-BSTDK
WHERE VBELN EQ W_ITEM-AUBEL.
MOVE W_ITEM-BSTDK TO PODATE.
SELECT SINGLE KNUMV FROM VBRK INTO W_FINAL-KNUMV WHERE VBELN = W_ITEM-VBELN.
**SELLING RATE/KG
SELECT SINGLE KBETR FROM KONV INTO W_FINAL-KBETR WHERE KNUMV = W_FINAL-KNUMV
AND KPOSN = W_ITEM-POSNR AND KSCHL = 'PR00'.
**TOTAL TARIFF VALUE
W_FINAL-TARIFF = W_FINAL-KBETR * W_ITEM-FKIMG.
SELECT SINGLE KBETR FROM KONV INTO W_FINAL-KWERT WHERE KNUMV = W_FINAL-KNUMV
AND KPOSN = W_ITEM-POSNR AND KSCHL = 'JEXT'.
*TOTAL DUTY PAYABLE
W_FINAL-DUTY = W_FINAL-KWERT / 10.
**AMOUNT
W_FINAL-AMOUNT = W_FINAL-TARIFF + W_FINAL-DUTY.
*TOTAL DUTY FOR CESS&EDCESS
TOTALDUTY = TOTALDUTY + W_FINAL-DUTY.
APPEND W_FINAL TO T_FINAL..
CLEAR W_FINAL.
*WRITE : /10 W_ITEM-ARKTX,
30 W_ITEM-FKIMG,
60 W_FINAL-KBETR,
90 TARIFF,
120 DUTY,
160 AMOUNT.
ENDLOOP.
*SELECT SINGLE KBETR FROM KONV INTO W_FINAL-KWERT WHERE KNUMV = W_FINAL-KNUMV
AND KPOSN = W_ITEM-POSNR AND KSCHL = 'ZECS'.
*MOVE W_FINAL-KWERT TO CESS.
*SELECT SINGLE KBETR FROM KONV INTO W_FINAL-KWERT WHERE KNUMV = W_FINAL-KNUMV
AND KPOSN = W_ITEM-POSNR AND KSCHL = 'ZECX'.
*MOVE W_FINAL-KWERT TO EDCESS.
*CESS
CESS = TOTALDUTY * 2 / 100.
*EDCESS
EDCESS = TOTALDUTY * 1 / 100..
*TOTAL VALUE AT FOOTER
TOTAL = W_FINAL-AMOUNT + CESS + EDCESS.
*VAT
VAT = TOTAL * 4 / 100.
*FREIGHT
*GROSS TOTAL
GROSSTOTAL = TOTAL + VAT.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSF_SD_INVOICE1'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAM
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_NAM
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
TOTALDUTY = TOTALDUTY
CESS = CESS
EDCESS = EDCESS
TOTAL = TOTAL
PONUMBER = PONUMBER
PODATE = PODATE
GROSSTOTAL = GROSSTOTAL
VAT = VAT
INVOICENO = INVOICENO
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
S_FINAL = T_FINAL
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.Hi,
U need to fill the ref_fieldname and ref_tabname or the cfieldname, ctabname for currency fields and qtabname and qfieldname for quantity fields in fieldcatalog.
santhosh
Message was edited by:
Kaluvala Santhosh -
Smartfomrs - runtime errors call_function_parm_missing
Hi,
I am trying to add in address in the COMADDR windows in the standard smartform YBMY_MMGR1. I go to form interface -> import tab n add in IS_LFA1 type LFA1. Then create an address in the window n put &IS_LFA1-ADRNR& in adddress number under general attribute tab. When i try to display this in MB90 i receive error runtime errors call_function_parm_missing
please advice
thankshi rajesh,
Your answer in the form of steps :
1) In standard smartform you are trying to display some extra field (in your case
ADRNR from table LFA1).
2) First identify the Standard driver program that is used by your Smartform.
3) Open that program and search for function module 'SSF_FUNCTION_MODULE_NAME'.
4) This function module will have a formname returned in import parameter
'FM_NAME' in some parameter.
5) Below SSF_FUNCTION_MODULE_NAME you would see a 'call function <parameter>',where
parameter is the same parameter used to get formname in step 4.
6) In this call function you need to pass 'IS_LFA1-ADRNR' in the export parameter.
ie, for ex Write something like :
ADRNR = IS_LFA1-ADRNR
7) now open the form and in form interface add this variable along with the type.
8) activate both driver program and form and i believe you should be able to see
the adrn(dont forget to add the variable in the window you wish to use to display it)
Hope your issue get solved. <begging removed by moderator>
Edited by: Thomas Zloch on Jan 17, 2012 -
Regarding dump error in smartforms
hi experts,
my one driver program along with smartforms is working fine in the development server after transportation to production server it is showing dump error :::
the error is:
Function module " " not found.
What happened?
The function module " " was called, but cannot be
found in the Function Library.
Error in ABAP application program.
The current ABAP program "ZSD_DELIVERY_ORDER_DRIVER_PREP" had to be terminated
because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
is especially useful if you want to keep a particular message.
Error analysis
An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_FUNC', was
not caught, which
led to a runtime error. The reason for this exception is:
The program "ZSD_DELIVERY_ORDER_DRIVER_PREP" contains a CALL FUNCTION
statement. The name
of the function module to be called is " ".
No function module exists with the name " ".
All function modules are stored in the Function Library (SE37).
Possible reasons:
a) Wrong name specified. Particular attention should be paid
to upper/lower case and underscores ("_")
b) Transport error
c) If an enqueue/dequeue module has been used, the lock object
may not have been activated (ABAP Dictionary)
may not have been activated (ABAP Dictionary).
i have checked in the production server but i m not finding <b>" "</b> this thing in the program ..plz help me to solve this.Hi Ravi,
Can you show me the code where you have called the smart form in driver program.Becaus the FM generated in Development server may differ from the FM generated in Production server.Make sure u r passing the FM which is generated from the function module SSF_FUNCTION_MODULE_NAME. -
Runtime error when executing smarforms.
Dear All,
I am getting the runtime error while executing a smartfrom which I have prepared for payslip display.
After the completion of smartform, I have tested by using print program, it was working fine. But, when I got the print of the same and I found, little modification it requires to enlarge the views.So, I increased the width of templates, tables and windows which has been used in this smartform.
After that modification, it is going to reuntime error.
Please sugget....to rectify this.
Thanks & Regards
Nrusingha.Please find the below details fr dump.
Short text
Exception condition "ERROR" raised.
What happened?
The current ABAP/4 program encountered an unexpected
situation.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
A RAISE statement in the program "SAPLSTXBC" raised the exception
condition "ERROR".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"RAISE_EXCEPTION" " "
"SAPLSTXBC" or "LSTXBCU19"
"SSFCOMP_GENERATE_SMART_FORM"
or
"SAPLSTXBC" "ERROR"
or
"RS_TESTFRAME_CALL " "ERROR"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
Maybe you are looking for
-
Recording the screen with a video camera
Can someone help me be able to record everything on my screen to my video camera? Can I use a firewire to do so? Is there a specific application i require? What I DON'T want to do is record my screen straight to the computer (this will be processor/s
-
Good morning, I'm getting this issue every time I'm using LiveCycle designer es4 and was wondering if someone else was getting that and if its fixable. When I design in Designer ES4 and then I press PREVIEW to check my work and then go back into desi
-
Uninstalling Photoshop Elements 8
I get an error at the end of the uninstall and it reverts to the installed version. Re-installing 8.0 did not help. I am missing a file. How do I get a copy of this file???? ERROR 1316A NETWORK ERROR OCCURED WHILE ATTEMPTING TO READ FROM FILE WIND
-
Nokia 5500 Xpress Music coming to TURKEY ?
Hi. I am from Istanbul / Turkey. Nokia 5500 sport released here for two or three weeks. But there is only 2 color: grey and yellow or black and white. I am wondering Will the other color, red and orange, come to Turkey ? It is called 5500 Xpress musi
-
Can I use my iPhone 3GS sim card in an iPhone 4s?
Can I use my iPhone 3GS sim card in an iPhone 4s?