Subroutine in smartform
how i can use a comman subroutine for different place.
i want to make a common subroutine for these two coding.
1----
data: v_date(2) type c,
v_month(4) type c,
v_year(4) type c.
select single eindt from eket
into w_eindt
where ebeln = is_ekko-ebeln.
v_year = w_eindt+0(4).
v_month = w_eindt+4(2).
v_date = w_eindt+6(2).
case v_month.
WHEN '01'.
v_month = 'JAN'.
WHEN '02'.
v_month = 'FEB'.
WHEN '03'.
v_month = 'MAR'.
WHEN '04'.
v_month = 'APR'.
WHEN '05'.
v_month = 'MAY'.
WHEN '06'.
v_month = 'JUN'.
WHEN '07'.
v_month = 'JUL'.
WHEN '08'.
v_month = 'AUG'.
WHEN '09'.
v_month = 'SEP'.
WHEN '10'.
v_month = 'OCT'.
WHEN '11'.
v_month = 'NOV'.
WHEN '12'.
v_month = 'DEC'.
WHEN OTHERS.
ENDCASE.
concatenate v_date v_month v_year into w_eindt1 SEPARATED BY '-' .
condense w_eindt1.
clear : v_year,
v_month,
v_date.
2----
data: v_date1(2) type c,
v_month1(4) type c,
v_year1(4) type c.
v_year1 = is_ekko-bedat+0(4).
v_month1 = is_ekko-bedat+4(2).
v_date1 = is_ekko-bedat+6(2).
case v_month1.
WHEN '01'.
v_month1 = 'JAN'.
WHEN '02'.
v_month1 = 'FEB'.
WHEN '03'.
v_month1 = 'MAR'.
WHEN '04'.
v_month1 = 'APR'.
WHEN '05'.
v_month1 = 'MAY'.
WHEN '06'.
v_month1 = 'JUN'.
WHEN '07'.
v_month1 = 'JUL'.
WHEN '08'.
v_month1 = 'AUG'.
WHEN '09'.
v_month1 = 'SEP'.
WHEN '10'.
v_month1 = 'OCT'.
WHEN '11'.
v_month1 = 'NOV'.
WHEN '12'.
v_month1 = 'DEC'.
WHEN OTHERS.
ENDCASE.
concatenate v_date1 v_month1 v_year1 into w_bedat SEPARATED BY '-' .
condense w_bedat.
clear : v_year1,
v_month1,
v_date1.
for 1st coding
I/P is like 22.10.2207
O/P is coming 22-AUG-2007
same for 2nd.
I/P is like 12.07.2005
O/P is coming 12-JUL-2005
i want a subroutine for these.
Create the Below Function Module and Call it in your Program Line to convert the date Format.
FUNCTION Z_DATE_CONVERT_GLOBAL.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IDATE) TYPE SY-DATUM
*" EXPORTING
*" REFERENCE(DAY) TYPE C
*" REFERENCE(MONTH) TYPE C
*" REFERENCE(YEAR) TYPE C
*" REFERENCE(STEXT) TYPE T247-KTX
*" REFERENCE(LTEXT) TYPE T247-LTX
*" REFERENCE(USERDATE) TYPE C
*" REFERENCE(OUT_DATE) TYPE C
*" EXCEPTIONS
*" INPUT_DATE_IS_INITIAL
*" TEXT_FOR_MONTH_NOT_MAINTAINED
* Date Formats For User Profiles
* 1 DD.MM.YYYY
* 2 MM/DD/YYYY
* 3 MM-DD-YYYY
* 4 YYYY.MM.DD
* 5 YYYY/MM/DD
* 6 YYYY-MM-DD
TABLES : USR01, T247.
DATA: USRTYPE LIKE USR01-DATFM.
DATA: SEPARATOR(1) TYPE C.
IF IDATE IS INITIAL.
RAISE INPUT_DATE_IS_INITIAL.
ENDIF.
* GET THE DATE COMPONENTS
DAY = IDATE+6(2).
MONTH = IDATE+4(2).
YEAR = IDATE+0(4).
* READ THE TEXT FOR THE MONTH
SELECT SINGLE * FROM T247 WHERE SPRAS EQ SY-LANGU
AND MNR EQ MONTH.
IF SY-SUBRC EQ 0.
MOVE T247-KTX TO STEXT.
MOVE T247-LTX TO LTEXT.
ELSE.
RAISE TEXT_FOR_MONTH_NOT_MAINTAINED.
ENDIF.
* FOR CONVERTING TO THE DATE FORMAT OF THE USER PROFILE.
SELECT SINGLE DATFM FROM USR01 INTO USRTYPE
WHERE BNAME EQ SY-UNAME.
IF SY-SUBRC EQ 0.
CASE USRTYPE.
* when the user profile is****************************
* Date Formats For User Profiles
* 1 DD.MM.YYYY
* 2 MM/DD/YYYY
* 3 MM-DD-YYYY
* 4 YYYY.MM.DD
* 5 YYYY/MM/DD
* 6 YYYY-MM-DD
WHEN '1'.
SEPARATOR = '.'.
CONCATENATE DAY MONTH YEAR INTO USERDATE SEPARATED BY SEPARATOR.
CONCATENATE DAY LTEXT YEAR INTO OUT_DATE SEPARATED BY SPACE.
WHEN '2'.
SEPARATOR = '/'.
CONCATENATE MONTH DAY YEAR INTO USERDATE SEPARATED BY SEPARATOR.
CONCATENATE DAY LTEXT YEAR INTO OUT_DATE SEPARATED BY SPACE.
WHEN '3'.
SEPARATOR = '-'.
CONCATENATE MONTH DAY YEAR INTO USERDATE SEPARATED BY SEPARATOR.
CONCATENATE DAY LTEXT YEAR INTO OUT_DATE SEPARATED BY SPACE.
WHEN '4'.
SEPARATOR = '.'.
CONCATENATE YEAR MONTH DAY INTO USERDATE SEPARATED BY SEPARATOR.
CONCATENATE DAY LTEXT YEAR INTO OUT_DATE SEPARATED BY SPACE.
WHEN '5'.
SEPARATOR = '/'.
CONCATENATE YEAR MONTH DAY INTO USERDATE SEPARATED BY SEPARATOR.
CONCATENATE DAY LTEXT YEAR INTO OUT_DATE SEPARATED BY SPACE.
WHEN '6'.
SEPARATOR = '-'.
CONCATENATE YEAR MONTH DAY INTO USERDATE SEPARATED BY SEPARATOR.
CONCATENATE DAY LTEXT YEAR INTO OUT_DATE SEPARATED BY SPACE.
ENDCASE.
ELSE.
WRITE IDATE DD/MM/YYYY TO USERDATE.
ENDIF.
ENDFUNCTION.
Similar Messages
-
Hi,
I want to use a subroutine in smartform.I gave the perform statement in the program lines and form statement in form routines in global definitions.
Now I want to use another perform statement inside this form statement.Can I use a perform inside a form statement?If so,where can I give the form statement for this perform statement?
Regards,
HemaHi Hema,
Have a look
https://forums.sdn.sap.com/click.jspa?searchID=11559162&messageID=4406782
https://forums.sdn.sap.com/click.jspa?searchID=11559258&messageID=450138
Regards
Kiran Sure -
Hi to all
Please Help me Regarding This i Have to convert integer value into Text format , in smartform
how to call Function Module in Smartform or how to call subroutine from smartform?
Please help me regarding this.
thanks In Advancd
Somnath K.In global definition there is tab for form routines, write ur form routine inside it, and call respective perform whereever u want ur code, insert codelines node for this purpose.
check this smartform documentation
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
see page 64 and 95 in it.
кu03B1ятu03B9к
Edited by: kartik tarla on Jan 30, 2009 1:53 PM -
HOW TO USE PERFORM STATEMENT IN SMARTFORMS
Hi,
Can anyone tell me how to use call subroutine in smartform?
Thanks & Regards,
Gauarv.Hi,
Hope this helps you..
You can use the PERFORM command to call an ABAP subroutine
(form) from
any program, subject to the normal ABAP runtime
authorization
checking. You can use such calls to subroutines for
carrying out
calculations, for obtaining data from the database that is
needed at
display or print time, for formatting data, and so on.
PERFORM commands, like all control commands, are executed
when a
document is formatted for display or printing.
Communication between a
subroutine that you call and the document is by way of
symbols whose
values are set in the subroutine.
The system does not execute the PERFORM command within
SAPscript
replace modules, such as TEXT_SYMBOL_REPLACE or
TEXT_INCLUDE_REPLACE.
The replace modules can only replace symbol values or
resolve include
texts, but not interpret SAPscript control commands.
Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of
the four
SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must
therefore be
character strings.
The ABAP subroutine called via the command line stated
above must be
defined in the ABAP report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
ENDFORM.
The values of the SAPscript symbols passed with /: USING...
are now
stored in the internal table IN_TAB . Note that the system
passes the
values as character string to the subroutine, since the
field Feld
VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR
80). See the
example below on how to access the variables.
The internal table OUT_TAB contains names and values of the
CHANGING
parameters in the PERFORM statement. These parameters are
local text
symbols, that is, character fields. See the example below
on how to
return the variables within the subroutine.
From within a SAPscript form, a subroutine GET_BARCODE in
the ABAP
program QCJPERFO is called. Then the simple barcode
contained there
('First page', 'Next page', 'Last page') is printed as
local variable
symbol. -
Providing subroutines for delivery note
how to tprovide subroutines for rvdelnote using smartforms.pla tell me its urgent.
Hi
This is a script and only in scripts we use the external Subroutines to get data from outside since in scripts we can't write the code
where as in Smartforms you can create your own PROGRAM LINES in the respective window and can write the code and fetch the data and can be used
so no need of writing subroutines in smartforms
DELIVERY NOTE
Output type : LD00
ScriptForm Name : RVDELNOTE
Driver Program Name : RVADDN01
smartform name <b>: LE_SHP_DELNOTE</b>
Smartform Driver Pgm: RLE_DELNOTE
Regards
Anji -
Hallow I have a program that call to smart form. The user have to put course number and employee number and the program check if the student pass the course send sf and if dont send other sf .my problem is when the user put just course number in, other words he wont to print sf of all the student that do some course , I dont now how to call to smart form in loop because all the time I have a new student and the program have to check if the student pass the course or not and send sf accordingly.
I heard about at new but I dont now how to use it or if its fitting my need .
regards
IF pernr IS INITIAL .
*--For-Empty-Pernr--
SELECT objid_e
FROM yhr_score_page
INTO wa_score_tab-objid_e
WHERE objid_e IN c_course.
IF sy-subrc = 0.
APPEND wa_score_tab TO score_tab.
CLEAR wa_score_tab.
ENDIF.
ENDSELECT.
ELSE.
SELECT objid_e
FROM yhr_score_page
INTO wa_score_tab-objid_e
WHERE objid_e IN c_course
AND objid_p = pernr.
IF sy-subrc = 0.
APPEND wa_score_tab TO score_tab.
CLEAR wa_score_tab.
ENDIF.
ENDSELECT.
ENDIF.
This is the call fo the smart form
IF sum_n GE passed_nuric. " if student pass course use first function
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'YHR_SCORE_SMART_FORM_PASS'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = /1bcdwb/sf00000005
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/SF00000005'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
score_tab2 = wa_score_tab2
sum_all = sum_all
sum_n = sum_n
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
score_tab = score_tab
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.
*--dont pass--
ELSE.
READ TABLE score_tab INDEX 1 INTO wa_score_tab.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'YHR_SCORE_SMART_FORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = /1bcdwb/sf00000002
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/SF00000002'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
score_tab = wa_score_tab
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
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.LOOP AT itab.
AT NEW stud.
perform xxxx.
ENDAT.
ENDLOOP.
Refer SF
Refer this link for Smartforms
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d937ec90-0201-0010-0ca8-b6cb3b6dd1ef
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b590fd97-0301-0010-db90-d09ff93cee5a
Subroutine in smartform
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
Style and mailing the Smartform output
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
Table,Template,Loop and Command in Smartform
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985 -
data: v_form_name type rs381_fnam.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'zsfexample'
* VARIANT = ' '
* DIRECT_CALL = ' '
* IMPORTING
FM_NAME = v_form_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.
I was trying to practice how to use subroutines in smartforms and how to pass select option from a program to smartform. I was experiencing error in abap code in se38
getting error rs381_fname is unknownHi,
Try passing the Smart form name in capital letters..
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSFEXAMPLE' " Changed here
Also for passing select-options to the Function module..
you have to create a table type in SE11 or use an existing table type
Check this link of how to create a table type
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
Thanks,
Naren -
Index in LOOP and BRANCH in Business Connector
Hello,
i use the SAP Business Conector 4.7 and want to map a structure from incoming XML-File to BAPI_PO_CREATE1. I loop over /ORDER[0]/ORDER/ORDER_ITEM_LIST/ORDER_ITEM/ACCOUNTING_INFO/COST_CATEGORY_ID
and BRANCH over
/ORDER[0]/ORDER/ORDER_ITEM_LIST/ORDER_ITEM/ACCOUNTING_INFO/COST_CATEGORY_ID/*body
But ORDER_ITEM has an index 0,1,2,3 on so on. So it works only, if i BRANCH over
/ORDER[0]/ORDER/ORDER_ITEM_LIST/ORDER_ITEM[0]/ACCOUNTING_INFO/COST_CATEGORY_ID/*body
for every index. But the index could change with every file.
How can i BRANCH over an index?
Thanks,
DanielLOOP AT itab.
AT NEW stud.
perform xxxx.
ENDAT.
ENDLOOP.
Refer SF
Refer this link for Smartforms
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d937ec90-0201-0010-0ca8-b6cb3b6dd1ef
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b590fd97-0301-0010-db90-d09ff93cee5a
Subroutine in smartform
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
Style and mailing the Smartform output
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
Table,Template,Loop and Command in Smartform
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985 -
Req small important doc on upgrading SAP
Hi SAP Gurus,
Can any one help me what I should prepare before go for an upgrade of SAP.
Thanks ,
KrisRefer this link for Smartforms
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d937ec90-0201-0010-0ca8-b6cb3b6dd1ef
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b590fd97-0301-0010-db90-d09ff93cee5a
Subroutine in smartform
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
Style and mailing the Smartform output
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
Table,Template,Loop and Command in Smartform
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
reward if these docs help u. -
How to call Subroutines,Standard Text & using Internal Table in SmartForm
Hi all,
need help in the following areas.Its very urgent!
1.How to CAll Subroutines in Smart Forms
2.How to CAll Standard Text in Smart Forms
Situation:
We have an Internal Table T_SALES with all the data which am going to display in the smartform,How to retrive data from an internal table in Smart forms
Any Help in this direction would be highly appreciated.
Regards
RamuHi,
When you are using quantity or currency fields, you have to mentiong the reference fileds in a tab called CURRENCY/QUANTITY FILEDS in the GLOBAL DATA node.
Specifying a Currency or Quantity Reference
Use
In the ABAP Dictionary, you can assign a currency or quantity field to a table field. In the output of these fields, the system can then insert the relevant currency or unit:
· If the value field is in the same table as the corresponding currency or quantity field, the system recognizes the reference automatically, and formats the value field according to the currency or unit in the assigned field.
· If the value field is in a different table from the currency or quantity field, the system cannot recognize this reference automatically.
In the second case, you must indicate this reference to the system in the form, to ensure that the value field is formatted correctly.
Procedure
You want to assign a currency or quantity field in one table (for example, CURTAB) to a value field in another table (for example, VALTAB).
1. Create the reference to the currency field by entering the following values:
- Field Name: VALTAB-VALUE, if this is the value field of VALTAB that you want to display.
- Reference Field: CURTAB-CURRENCY, which is the currency field of CURTAB.
2. Under Data Type, specify whether the data type is a currency or quantity.
Result
In the output of the PDF-based print form, the system formats the value field VALTAB-VALUE according to the assigned value in the currency or quantity field of the global variable CURTAB-CURRENCY.
Thanks and Regards,
Bharat Kumar Reddy.V
Message was Added by: Bharat Reddy V
Message was Added by: Bharat Reddy V -
How to use SUBROUTINE in ' PROGRAMMING LINES'code of a smartform
Hi all,
i used a subroutine (PERFORM statement ) in 'Programming Line' node of a smartform .
Then i put the 'FORM ENDFORM ' in 'SUBROUTINES' node of GLOBAL data.
In Programming line i used
PERFORM READ_TEXT using p_id p_lan p_obj.
In SUBROUTINE node of GLOBAL data, i used
FORM READ_TEXT using p_id p_lan p_obj.
ENDFORM.
While executing, my control is going to FORM ENDFORM & i can see the data in the
table T_TDLINE while my control is inside the FORM ENDFORM.
When it comes back to my Programming NODE, there is no data in T_TDLINE table.
can anyone tell me how & where to define this table T_TDLINE so that i can get the data
in in my coding lines after PERFORM statement.
ur Idea is highly appreciated. correct answers will be rewarded.
Thanks
pabitra1. Define a table in the Global Definiation > GLOBAL data:
T_TDLINE TYPE TTTEXT.
2. PERFORM READ_TEXT tables T_TDLINE using p_id p_lan p_obj.
3. FORM READ_TEXT table IT_TDLINE type TTTEXT
using p_id p_lan p_obj.
ENDFORM.
Now, you will be able access your data in T_TDLINE.
Regards,
Naimesh Patel -
Subroutine code in smartforms?
How to write subroutine code in smartforms?
Hi,
Smarforms
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
SmartForms : some links
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
http://www.sap-img.com/smartforms/smart-001.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sap-img.com/smartforms/smart-002.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
http://www.allsaplinks.com/smartform_example.html
http://www.sap-basis-abap.com/sapsf001.htm
Smart Form PDF Link
http://help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://sap.ionelburlacu.ro/sap0/sapsf001.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/16/a369b1800e4bdda978ee0fe3b7bd2c/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-img.com/smartforms/smart-001.htm
Re: How to Debug a Smartform
Debug of smartform and sapscript.
Debugging SmartForms
Debugging of a subroutine pool.
http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
Kindly Award Points If You Find The Reply Helpful.
Cheers,
Chaitanya. -
Driver program for BIll of lading smartform
Hi all,
Can you please provide me the standard driver program for bill of lading smartform.
or for purchase order smartform.
Thanks and regards,
RajeevHi,
For Purchase Order - SAPFM06P.
And for future info,
If you Know the Application and Output Type - Then it is very easy to know the Smartform or the Script Used.
1.Go to NACE and Check.
For Ex: PO belong to APP type EF, So click on EF and then click on "Output Type " button.
Then all the output types will be displayed.Then select the required and Click on "Processing Functions". Then you can see the Configuration details done for this ouput type like which smartform, which subroutine.
2.Also, You can check the TNAPR table entries by entring the below information
Output Type, Message transmission medium, Application.
Thanks & Regards,
Vamsi. -
Printing Dunning Letters using Smartforms
Hi all,
I have a requirement wherein I need to print dunning letters using smartforms; the dunning data are extracted in program SAPF150D2;I modified the subroutine OFI_DUN_ACT to call function module FI_PRINT_DUNNING_NOTICE_SMARTF.
Now I need to extract the dunning data in program SAPF150D2 to be imported to my new form using GET_SF_DUNN_DATA, my question is where do I code the calling of FM GET_SFG_DUNN_DATA? I'm a little bit confused on the step by step process of the dunning data extraction to printing of the form... Thanks...In the INITIALIZATION of the Smartforms, after the call to GET_SF_DUNN_DATA, you have a many informations back, of which the record of MHNK and an internal table of MHND, which you can use to select other informations from database.
So fill or enrich your own internal table in the initialization.
I enclose thereafter a sample to help you
* Load data
CALL FUNCTION 'GET_SF_DUNN_DATA'
EXPORTING
is_sfparam = is_sfparam
IMPORTING
es_mhnk = mhnk
es_t001 = t001
es_knb5 = knb5
es_lfb5 = lfb5
es_t047 = t047
es_t047c = t047c
es_t047i = t047i
es_t056z = t056z
es_f150d = f150d
es_fsabe = fsabe
es_adrnr = adrnr
es_uadrnr = uadrnr
es_adrs = adrs
es_uadrs = uadrs
es_t047b = t047b
eb_testprint = testprint
e_langu = langu
e_lang2 = lang2
es_f150d_esr = f150d_esr
es_paymi = paymi
es_paymo = paymo
TABLES
t_mhnd = th_mhnd
EXCEPTIONS
no_parameters_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
sy-msgid = 'FM'.
sy-msgty = 'E'.
sy-msgno = 461.
RAISE others.
ENDIF.
h_t040a-text1 = space.
show_interest = space.
LOOP AT th_mhnd INTO mhnd WHERE xzins = ' '.
show_interest = 'X'.
EXIT.
ENDLOOP.
* Load user information
DATA: usr21 LIKE usr21, addr3_sel LIKE addr3_sel.
CLEAR: usr21, addr3_sel, addr3_val, adr6.
* Charger fiche profil
SELECT SINGLE * FROM usr21 WHERE bname = sy-uname.
* Récupérer l'adresse
MOVE-CORRESPONDING usr21 TO addr3_sel.
CALL FUNCTION 'ADDR_PERS_COMP_GET'
EXPORTING
address_pers_in_comp_selection = addr3_sel
IMPORTING
address_pers_in_comp_value = addr3_val
EXCEPTIONS
OTHERS = 1.
* load SMTP address
CLEAR adr6.
SELECT SINGLE * FROM adr6
WHERE addrnumber = usr21-addrnumber
AND persnumber = usr21-persnumber.
* date format
SET COUNTRY adrs-land1.
* Group similar posts
DATA: xbseg TYPE bseg,
xbkpf TYPE bkpf,
xpost TYPE th_outtab.
REFRESH: t_post, t_cumul_waers.
LOOP AT th_mhnd INTO mhnd.
* Select lines to use
IF mhnk-gmvdt IS INITIAL.
IF mhnd-xzalb <> space OR mhnd-mansp <> space.
CONTINUE.
ELSEIF t047b-xpost NE 'X' AND mhnd-xfael <> 'X'.
CONTINUE.
ENDIF.
ENDIF.
* Map data
CLEAR xpost.
MOVE-CORRESPONDING mhnd TO xpost.
* Load text from bseg
SELECT SINGLE sgtxt INTO xpost-sgtxt FROM bseg
WHERE bukrs EQ mhnd-bbukrs AND belnr EQ mhnd-belnr
AND gjahr EQ mhnd-gjahr AND buzei EQ mhnd-buzei.
PERFORM edit_text CHANGING xpost-zuonr mhnd-xblnr xpost-sgtxt.
* if "Payment difference" get the date of original document
IF mhnd-bschl = '06'.
SELECT SINGLE bldat INTO xpost-bldat
FROM bkpf
WHERE bukrs = mhnd-bukrs
AND belnr = mhnd-rebzg
AND gjahr = mhnd-rebzj.
ENDIF.
* Collect posts to print
COLLECT xpost INTO t_post.
* Collect amount per currency
MOVE-CORRESPONDING xpost TO cumul.
COLLECT cumul INTO t_cumul_waers.
ENDLOOP.
* Load customer information
SELECT SINGLE * FROM kna1 INTO kna1
WHERE kunnr = mhnk-kunnr.
SELECT SINGLE * FROM knb1 INTO knb1
WHERE bukrs = mhnk-bukrs
AND kunnr = mhnk-kunnr.
* Convert date to text
PERFORM convert_date USING control_parameters-langu mhnk-laufd
CHANGING text_date.
PERFORM convert_date USING control_parameters-langu mhnk-prndt_before
CHANGING text_prev.
PERFORM convert_date USING control_parameters-langu mhnk-grdat
CHANGING text_extr.
Regards -
Hi all,
I have imported standard SAP SmartForm /smb40/sdorc_a and I am using it with standard SAP program /smb40/rvador01
but when i try to test it i get an error Output could not be issued
If anyone can provide me with any info on this one???
Thanks in advance,
MajaSee,
Standard smartforms are ment to be executed using some t.code. If you go to se38 and try to execute the program you wont get the output. The type of driver program is always 'S' (Subroutine pool).
All you have to do is identify which tcode is using the driver and form.Goto Tcode NACE and check whether the configration is done properly or not. Once you are satis fied with the setting goto the tcode which uses the form Enter the nessasary data and see the output.
Take the help of functionals for Nace configration and showing you the first out.If you are doing any changed in the form ot program you need to make sure thet the program will be called with some standard tcode and the configration is done properly.
Thanks,
sandeep.
Maybe you are looking for
-
Mac Mini Server Mid 2011 i7 problems
I have a Mac Mini Server with an i7 Mid 2011 that had a lot of issues with memory because we were running so many services with 4GB of memory and would have 4 pages of usage in activity monitor after the 4GB of memory was full. It wouldn't restart on
-
No sound when pressing volume keys
When I press the volume keys on my keyboard, it doesn't make the sound that lets you know the level of volume. It sometimes works, but mostly its not working. Please help.
-
Safari 5 Starts, then immediatly quits!
Hey. I am runnin Windows Vista Home Basic, i used to use Safari 5 alot lately and had no problems with it. Until I tried to load it up today. It would load the browser and then just immedialy quit. I posted the Problem Signiture Below. Someone help p
-
Hi, I want to use ojdbc (jdbc 9.2.0.4) instead of the default jdbc used by JDeveloper. I am connecting to an Oracle Database (version 9.2.0.4). I have changed the project settings to use ojdbc14.jar and also registered the driver in tools/preferences
-
I have some mail messages that I would like to open within iFS. How do I check that they are a mail message when I retrieve the PublicObject please? tia Chris null