Double under line in amount using smartforms
Hello ABAPers,
Kindly help me about my problem in smartforms regarding the grand total amount in report...this should be the right format in amount :
1,200
=====
how can i do this using line type? under table...
i tried to use a script sy-uline...in smartstyles..and its ok..but my main problem is under line type..because the amount is in column...
Please help..
Will reward points
Thanks in advance
aVaDuDz
hai,
this is very simple.
1) u have to create special paragraph format in style, which should have very small line spacing(do u know wr to gv line spacing?).
2) In smartform create a text below the amount, where u want double underline. then put a underline in the newly created text according to the lenght of the amount.and apply the special style to the newly created text.
3) Do the second step again to have the second underline.
Note : its purely depends upon the line spacing in "Indents and spacing"
regards,
safiq.
Similar Messages
-
How to get the line in the template (smartform) with out using under score
Hi,
How to get the line in the template (smartform) with out using under score,
and how to print the box (line the check box - small squre box (which is used ot mark the tick by the user in front of the item).
Please provide the valueble answer as early as possible.
Thanks,
RaviHi Ravi,
Line -
Use a SMATSTYLE for this purpose.in the smartstyle create a paragraph or character with underline atribute.Then call the smartstyle in the text.
Search SDN with Key <b>UNDERSCORE</b>.. will get few more posts on the same.
For Checkbox - refer link
Re: Quick Question on Smartforms
Re: putting tick mark into check box in smartform
Reward points if this Helps.
Manish
Message was edited by:
Manish Kumar -
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 -
Changing the line vat amount on an invoice using the di api SBO 2005a
Hi
I am using SBO 2005a SP01 PL36.
I have written some code to import sales invoices which works fine apart from the fact I want to overwrite the line vat amount -
oinv.Lines.NetTaxAmount = vatam
SAP seems to ignore this and just calculate it anyway, it's like it's a read only field
Can anyone help me please ?
Thanks
Regards AndyPaul,
you are true,
NetTaxAmount is readonly field. If you want to modify this field, you should work with lines.
Petr -
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 -
Purchase order layout using Smartform
Hi All,
Can anyone let me know how to create Purchase order layout using smartforms and assigning it to output type.
Is there standard smartform for purchase order?http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
http://www.sap-basis-abap.com/sapsf001.htm
http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
http://www.esnips.com/doc/13b7ae7a-b32c-4b96-b588-881859d4ac99/Template,Table,Loop,Command-in-Smartforms.doc
http://www.esnips.com/doc/97acb00a-e513-4611-91f0-c626f460bfc5/Smart_Form_Overview.pdf
http://www.esnips.com/doc/77a981b9-8fe3-4fbb-8101-67745c1fe60c/SMART-FORMS_shail.ppt
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
Try this. A simple sample Smart Form.
SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
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.
SMARTFORMS GENERATION: (calling internal table fields)
 Open a smartform using the tcode smartforms.
 Usually form attributes shows admn data.
 In the form interface declare import/export parameters if any. Else declare the tables in tables tab button.
 In the windows and pages expand and create a table. It automatically generates header, main area and footer for the table.
 In data tab button in the table we usually declare a work area to bring the data from se38. Like: ktab into wa. ( The purpose of declaring the wa is , to get the data of the ktab in to header from the body area of the internal table).
 And in the tablepainter pushbutton in table we can have any no of line types. Depending on the requirement. ( for ex: If we want to devide a row in to 4 columns, we can devide it as 4,4,4,4cm as line type 1, And usually for the footer we dont need no of columns, So, we declare it as one column with 16cm measure with the name line type 2.). We can use these line types in the tables.
 In the header right click>>create>>tableline. It asks for line type. Select one line type which is appropriate.
 Like same create a row2 in main area using right click. If we select the line type 1, it automatically generates 4 cells. We can create text in each cell as per requirement.
 We can generate general attributes using general attributes tab button in the text. Or in the other way. We can switch on the field list on/off button from the application tool bar. It displays all the attributes in the left down corner of the screen. We can drag and drop the required fields in the general attributes tab button of the text.
 We continue the same procedure for all the texts. The texts should be displayed in the gray color. Then only it can collects the data from the abap editor fields.
 If it wont turns gray, we can check the fields in the editor by changing it to the line editor. The best thing is to drag the fields from the list, rather than declaring like &wa-matnr&
 In the footer also we create a line type and in that table line we create text.
SE38 PROGRAM(method I):
REPORT Z_CALLING_SMARTFORM2 .
tables: mara.
select-options: S_MATNR for MARA-MATNR.
DATA: kTAB LIKE MARA OCCURS 1 WITH HEADER LINE.
data: FM_NAME TYPE RS38L_FNAM.
SELECT * FROM MARA INTO TABLE kTAB WHERE MATNR in
S_MATNR.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_MYFIRST_FORM2'
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
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
ktab = ktab
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 OTHER WAY(method II):
REPORT Z_CALLING_SMARTFORM2 .
tables: mara.
select-options: S_MATNR for MARA-MATNR.
DATA: kTAB LIKE MARA OCCURS 1 WITH HEADER LINE.
SELECT * FROM MARA INTO TABLE kTAB WHERE MATNR in S_MATNR.
CALL FUNCTION '/1BCDWB/SF00000199'
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
ktab = ktab
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 method I we are calling the amartform dynamically using the function module 'SSF_FUNCTION_MODULE_NAME'.
Here we are exporting form name and importing fm_name.
So we need to declare the variable fm_name as
data: FM_NAME TYPE RS38L_FNAM.
We can have the type of the fm_name in the function module 'SSF_FUNCTION_MODULE_NAME' (in the export tab button).
Since we are passin the name of the Function module generated by the smart form in to the fm_name variable. We run the function module with the name fm_name, but not the FM generated by the smartform(like /1BCDWB/SF00000199)¬¬¬¬¬¬.
In the method II we directly call the smartform generated function module (i.e, /1BCDWB/SF00000199).
But the method I is recommended. In the method I, The fm_name is a variable we dont put it in the quotes while calling.
In the both methods we declare the internal table using the like option, but not begin of . end of. And in select statement we select *, But not individual fields.
EX2:
SMART FORM NAME: ZGITI_FORM1.
SE38:
REPORT Z_CALL_GIRI_FORM1 .
TABLES: VBRK.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE T1.
SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
SELECTION-SCREEN END OF BLOCK B1.
*INITIALIZATION.
*T1 = 'SELECTION-CRIETERIA'.
DATA: BEGIN OF I_INVOICE OCCURS 1.
INCLUDE STRUCTURE ZSTR_INVOICE.
DATA: END OF I_INVOICE.
DATA: VAR1 LIKE VBRP-NETWR.
DATA: BEGIN OF I_ADDRESS OCCURS 1.
INCLUDE STRUCTURE ZSTR_ADDRESS.
DATA: END OF I_ADDRESS.
DATA: BEGIN OF I_ORDER OCCURS 1.
INCLUDE STRUCTURE ZSTR_ORDER.
DATA: END OF I_ORDER.
DATA: BEGIN OF I_ITEM OCCURS 1.
INCLUDE STRUCTURE ZSTR_ITEM.
DATA: END OF I_ITEM.
DATA: BEGIN OF I_VBFA OCCURS 1,
VBELV LIKE VBFA-VBELV,
VBELN LIKE VBFA-VBELN,
END OF I_VBFA.
SELECT KUNAG VBELN VKORG VTWEG SPART FROM VBRK INTO TABLE I_INVOICE
WHERE VBELN IN S_VBELN.
IF I_INVOICE[] IS NOT INITIAL.
SELECT KUNNR LAND1 NAME1 NAME2 ORT01 PSTLZ REGIO FROM
KNA1 INTO CORRESPONDING FIELDS OF TABLE I_ADDRESS FOR ALL ENTRIES IN
I_INVOICE WHERE KUNNR = I_INVOICE-KUNAG.
ENDIF.
IF I_INVOICE[] IS NOT INITIAL.
SELECT VBELV VBELN FROM VBFA INTO TABLE I_VBFA FOR ALL ENTRIES IN
I_INVOICE WHERE VBELN = I_INVOICE-VBELN.
ENDIF.
IF I_VBFA[] IS NOT INITIAL.
SELECT VBELN BSTNK FROM VBAK INTO CORRESPONDING FIELDS OF TABLE I_ORDER
FOR ALL ENTRIES IN I_VBFA WHERE VBELN = I_VBFA-VBELV.
ENDIF.
IF I_INVOICE[] IS NOT INITIAL.
SELECT POSNR MATNR ARKTX FKIMG NETWR FROM VBRP INTO TABLE I_ITEM FOR ALL
ENTRIES IN I_INVOICE WHERE VBELN = I_INVOICE-VBELN.
ENDIF.
LOOP AT I_ITEM.
AT LAST.
SUM.
VAR1 = I_ITEM-NETWR.
ENDAT.
ENDLOOP.
CALL FUNCTION '/1BCDWB/SF00000223'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
var = VAR1
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
tables
i_vbrk = I_INVOICE
i_vbak = I_ORDER
i_vbrp = I_ITEM
i_kna1 = I_ADDRESS
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. -
Print PO using Smartforms?
Hi Gurus,
I'm new to smart forms.
Can smart forms used to print PO(using Transaction ME23N)?
As I know, the PO is print using SAP Script, can it be done using smartforms?
thanks in advance.
HikarunoHi
YES, PO can be printed using Smartform also.
see the related forms and program
PUCHASE ORDER
Output type : NEU
ScriptForm Name : MEDRUCK
Driver Program Name : SAPMF06P
smartform name : /SMB40/MMPO_L
SF creation
How to create a New smartfrom, it is having step by step procedure
http://sap.niraj.tripod.com/id67.html
Here is the procedure
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
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.
check this:
http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
check this linkls------>
https://www.sdn.sap.com/irj/sdn/collaboration
http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
<b>Reward points for useful Answers</b>
Regards
Anji -
Urgent!! Printing Barcode using smartforms
req: need to print barcode using smartforms.
【Settings】
The following settings are made already
1. Style ( paragraph, character type(Syatem Barcode ) )is created and activated (T-code:Smartforms)
2. In the smartform I used the above style to print barcode .
※TEXTTYPE = TEXT ELEMENT.
【Execution】
1. I run the smartform in test mode with setting any print parameters
2. Trigger print preview
【Problem】
1. I am getting only BAR's no barcodes.
The bracodes are not displayed properly.
If I test the same system barcode in SE73 it displayed properly.
Is there anyother settings are necessory?
Plz help me in solving the peoblemHi
To Create a Bar code prefix:
1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
The place where you are using the field value use like this
<C1> &itab-field& </C1>.
You will get the field value in the form of barcode.
Which barcode printer are you using ? Can you download this file and see.
http://www.servopack.de/Files/HB/ZPLcommands.pdf.
It will give an idea about barcode commands.
Check this link:
http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
Check this link:
http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
Hope this link ll be useful..
http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
Detailed information about SAP Barcodes
A barcode solution consists of the following:
- a barcode printer
- a barcode reader
- a mobile data collection application/program
A barcode label is a special symbology to represent human readable information such as a material number or batch number
in machine readable format.
There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
You can print barcodes from SAP by modifying an existing output form.
Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
Reward points for useful Answers
Regards
Anji -
Check/Validate Line item Amount against Credit Balance of Customer in FBL5N
Hi ,
I need to Check/Validate Line item Amount BSEG -WRBTR (Screen 301, Prg. SAPMF05A ) in F-02 against Credit Balance of Customer in FBL5N.If amount entered in F-02 with posting key 01 and same company code is greater than total credit balance with customer ,then i need to pop up error message.
I have tried this with GGB0 using my own exit incl & including ZRGGBR000 in neccesay customization.Still not working.
Pls suggest a solutiion for this
Regds,
abhee
Edited by: abheesawant on Jul 29, 2010 6:59 AMHI,
To trigger user exit form pool (ZRGGBR000) you need to do setting in OB28 and activate it.
Regards,
Sri -
Reg: Printing multiple lines of line item in a smartform?
Hi Experts,
I have a query regarding printing multliple line items in a smartform. In this form i dont have control on the font size because the client is using some generic type format to print the data in EPSON LQ 590.
Here this generic type drivers, it has his own default font.
If i print using the normal EPSON LQ 590 drivers, alignment is perfectly fine. But in generic case its totally different.
My query is in my item row there are 7 columns. If one of the column exceeds the space which i have assigned for that particular cell, it should go to next line automatically. How should i do this?
Then there should be a line space between 2 rows of data. How should i do this?
Please help me on this.
Another query is date is getting displayed as 19.07.2009, due to the space problem in that particular cell i need to display as 19.07.09. Please tell me how should i do this also?
Waiting for the reply.
Thanks and Regards,
Abdur RafiqueUse smartstyles for the same to mke sure it goes into next line. Also you can set space between 2 lrows to one line.
For the date issue..use the following piece of code...
DATA: w_date TYPE sy-datum,
w_char TYPE char8.
CONCATENATE w_date+6(2) w_date+4(2) w_date+2(2) INTO w_char SEPERATE BY '.'. -
Withholding tax amount exceeds the customer/vendor line item amount 001
Hi Guys,
I am trying to release an invoice using VF02 transaction but I recieved the below error message:
Message no. 7Q321
Withholding tax amount exceeds the customer/vendor line item amount 001
There are 2 SAP (718078 and 513201) notes regarding that but they are not applicable in ECC 6.0.
How can I figure out this issue?
Thanks,
Daniel DortaHi,
This may happen because you have give base exemption and after that charge tax. In this case you have posted earlier invoice w/o wht and now you are posting the small amount of invoice on which wht is calculated including the earlier exempt amt. In this case the wht exceeds the base amt.
In this case if possible you first post the invoice with sufficient amount which can deduct the WHT .
If your scenario is different give details.
Regards
Milind Sonalkar -
Withholding tax amount exceeds the customer/vendor line item amount
Hi experts
I am having one problem please help me
My user created one down payment, entry is like this
Vendor Dr-193914
To TDS 3878
To Bank 190036
After this he has booked MIRO with the same value 193914 & has deducted TDS 3878 over that invoice
Now when he is going to adjjust that down payment against that MIRO with specific line item 62
system is throwing that error.
Withholding tax amount exceeds the customer/vendor line item amount 002
Message no. 7Q321
I checked invoice booked correctly & TDS also dedcuted properly why system is throwing that error message
please help me
Regards
Nitin ShuklaHi Madhu
thanks a lot for instant reply
We are using F-54 Down Payment adjustment at this time we are facing problem & we are clearing against invoice
& with specific line item
For Eg. 5100001596 & line item - 53
Regards
Nitin Shukla -
Wht tax amount exceeds the customer/vendor line item amount 001Mess no7Q321
Dear Experts,
We are also getting same error in production"Withholding tax amount exceeds the customer/vendor line item amount 001 Message no. 7Q321"
Please gudie me how to resolve this issue, while posting vendor invoice in T-code - F-43 i am getting bellow error message why because we client requirement is accumulation activity required so is there any solution for this with out changing accumulation activity.
We need to use this accumulation activity.
I would be greatful if you could help us to resolve this issue.
thanks
SeshuIf its relating to TRM- Transaction manager, please implement note no " 1961340 - Calculation of withholding tax for 2nd or 3rd local currency "
Regards
Anil -
Vendor open line item amount payment in app through different house banks
Hi,
Kindly Help me.
Our client requirment is vendor open line item amount payment in app through using different house banks is it possible.
Please let me known
Thanks & Regards
RamuHi
Generally , you can assign a default house bank and account id in the vendor master record. During execution of Automatc payment program this house bank will be used ( provided your APP configuration via FBZP and APP parameters are in line ). However, you can change the default house bank at the document line item level to a different house bank and this would be checked with house bank configuration via FBZP ( and your APP parameters ) and payment made via the preferred house bank .
You may also change the house bank while editing the Automatic payment proposal through a re-allocation of house bank .
Hope this helps.
Regards
VidhyaDhar -
Displaying line item details in smartform
Hi,
I need to display tax details of each line item in a smartform in the given format. Tax details should get displayed only if it present. Please tell me how to do this.
for ex:
item description qty price
10 ytfytfyf 20 30
VAT:2%
Service Tax: 3%
20 rwedw 30 10
VAT:3%
service tax:4%
Thanks.hi,
Under the loop node after displaying
item description qty price
10 ytfytfyf 20 30
create another loop node of table tax information under the main loop with condition that is having same field in common... then create text elements to display the following data
VAT:2%
Service Tax: 3%
regards
padma
Maybe you are looking for
-
My MAC now notes that I can't open the application "Epson Scan" because PowerPC application are no longer supported. What is the fix and how do I download it ? Thanks, Rusty in the Rockies
-
Boot devices broken after Windows 8.1 installation
Hey guys, I work for an IT company and am having some troubles after installing Windows 8.1. I run an enterprise copy provided from my company, so I couldn't do the update, and used an ISO to perform the update manually. After the update, I'm no long
-
Whats the best way to get photos off ipod touch 4?
I want to get my sons photos off his ipod touch 4 (ios 6-something), and onto a flash drive so he can use them in Windows movie maker, and to free up space on his ipod. Can't use dropbox with ios 6. I've backed up his ipod to our PC, but I can't find
-
Hi All, I developed alv grid.I passed data from it_final table into grid.In our it_final table, there is 10 rows and when I execute report then it comes 10 line item.It is perfect. Now I do subtotal in any field.Then In the grid total 15 line item
-
Alternative Reconciation Account
Hi All, My Client got scenario where same vendor will be supplying raw material, capital goods and also expenditure items. Since in the vendor master only one recon a/c can be assigned. but client required report of Dr. and Cr. balance of raw materia