How to split Smart forms at Item level??
Hi,
We have developed a smarform for printing customer statements.right Now it is working fine .
As we went live globaly there might be statements in differeent currencies.
My item table holds the currency field and i want split the statements with respective currencies..
How can we do this?
Present logic is like this in my driver program.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = P_FORM
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.
LS_COMPOSER_PARAM-TDNEWID = 'X'.
LS_CONTROL_PARAM-PREVIEW = ''.
SORT T_HEADER BY NAME1 KUNNR.
LOOP AT T_HEADER INTO WA_HEADER.
REFRESH ITEM_ITAB.
LOOP AT T_ITEM WHERE KUNRG = WA_HEADER-KUNNR.
APPEND T_ITEM TO ITEM_ITAB.
ENDLOOP.
SORT ITEM_ITAB BY FKDAT.
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_INDEX_TAB = ARC_IND_TAB
ARCHIVE_PARAMETERS = ARC_PARAMS
CONTROL_PARAMETERS = LS_CONTROL_PARAM
MAIL_APPL_OBJ = LS_RECIPIENT
MAIL_RECIPIENT = LS_RECIPIENT
MAIL_SENDER = LS_SENDER
OUTPUT_OPTIONS = LS_COMPOSER_PARAM
USER_SETTINGS = SPACE
WA_ITAB = WA_HEADER
IMPORTING
DOCUMENT_OUTPUT_INFO = DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = JOB_OUTPUT_OPTIONS
TABLES
WA_DEP = ITEM_ITAB
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4.
IF SY-SUBRC <> 0.
WRITE: / 'ERROR in passing vars to the smartforms '.
ENDIF.
LS_COMPOSER_PARAM-TDNEWID = SPACE.
LS_CONTROL_PARAM-NO_DIALOG = 'X'.
LS_CONTROL_PARAM-PREVIEW = ''.
Hi,
Check this code..The changes are marked in bold...I have mentioned CURRENCY_FIELD for the currency field name..If it is WAERS..replace the currency_field with waers..
<b>DATA: ITEM_TAB_TMP LIKE ITEM_ITAB OCCURS 0 WITH HEADER LINE.
DATA: V_PREV_CUR LIKE ITEM_ITAB-CURRENCY_FIELD.</b>
LOOP AT T_HEADER INTO WA_HEADER.
REFRESH ITEM_ITAB, ITEM_TAB_TMP.
LOOP AT T_ITEM WHERE KUNRG = WA_HEADER-KUNNR.
APPEND T_ITEM TO ITEM_ITAB.
ENDLOOP.
<b>SORT ITEM_ITAB BY CURRENCY_FIELD.</b>
LOOP AT ITEM_TAB.
<b>IF SY-TABIX <> 1.
IF V_PREV_CURR <> ITEM_ITAB-CURRENCY_FIELD.</b>
<b>SORT ITEM_ITAB_TMP BY FKDAT.</b>
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_INDEX_TAB = ARC_IND_TAB
ARCHIVE_PARAMETERS = ARC_PARAMS
CONTROL_PARAMETERS = LS_CONTROL_PARAM
MAIL_APPL_OBJ = LS_RECIPIENT
MAIL_RECIPIENT = LS_RECIPIENT
MAIL_SENDER = LS_SENDER
OUTPUT_OPTIONS = LS_COMPOSER_PARAM
USER_SETTINGS = SPACE
WA_ITAB = WA_HEADER
IMPORTING
DOCUMENT_OUTPUT_INFO = DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = JOB_OUTPUT_OPTIONS
TABLES
WA_DEP = <b>ITEM_ITAB_TMP</b>
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4.
IF SY-SUBRC <> 0.
WRITE: / 'ERROR in passing vars to the smartforms '.
ENDIF.
LS_COMPOSER_PARAM-TDNEWID = SPACE.
LS_CONTROL_PARAM-NO_DIALOG = 'X'.
LS_CONTROL_PARAM-PREVIEW = ''.
<b> REFRESH ITEM_TAB_TMP.
ELSE.
MOVE ITEM_TAB TO ITEM_TAB_TMP.
APPEND ITEM_TAB_TMP.
ENDIF.
ENDIF.</b>
<b>AT LAST.
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_INDEX_TAB = ARC_IND_TAB
ARCHIVE_PARAMETERS = ARC_PARAMS
CONTROL_PARAMETERS = LS_CONTROL_PARAM
MAIL_APPL_OBJ = LS_RECIPIENT
MAIL_RECIPIENT = LS_RECIPIENT
MAIL_SENDER = LS_SENDER
OUTPUT_OPTIONS = LS_COMPOSER_PARAM
USER_SETTINGS = SPACE
WA_ITAB = WA_HEADER
IMPORTING
DOCUMENT_OUTPUT_INFO = DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = JOB_OUTPUT_OPTIONS
TABLES
WA_DEP = <b>ITEM_ITAB_TMP</b>
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4.
IF SY-SUBRC <> 0.
WRITE: / 'ERROR in passing vars to the smartforms '.
ENDIF.
LS_COMPOSER_PARAM-TDNEWID = SPACE.
LS_CONTROL_PARAM-NO_DIALOG = 'X'.
LS_CONTROL_PARAM-PREVIEW = ''.
ENDAT.
V_PREV_CUR = ITEM_TAB-CURRENCY_FIELD.</b>
ENDLOOP.
Message was edited by: Narendran Muthukumaran
Similar Messages
-
Split at sales order item level
Hi SD gurus...
Iam trying batch determination at sales order item.
I could get every thing except batch split/ Even though required split are maintained in batch search record, it is getting as 001 only at the time of determination during sales order.
I think this is a standard phenomena. is there any work arround possible to get the required batch split at sales order item level.
warm regards
sairam akundiHi Sairam,
Contrary to deliveries, batch splits are not possible for sales orders (as opposed to delivery). Even if you have defined a certain number of batch splits in the batch search strategy, the system overrides this default setting.
Maybe you can explore USEREXIT_MOVE_FIELD_TO_KOMPH -
How to find the header and item level status of a CRM contract ?
Hi,
Few questions
A. How to find the header and item level status of a CRM contract ? My req is to select all the contract line items which are in CLOSED status.
B. How to get the BPs associated with a contract ?
Anyone have the list of CRM tables and the relation amongst them. Please mail me in [email protected]CRMD_ORDERADM_H Contains the Header Information for a Business Transaction.
Note:
1. It doesnt store the Business Partner
responsible for the transaction. To
get the Partner No, link it with
CRM_ORDER_INDEX.
2. This table can be used for search
based on the Object Id(Business
Transaction No).
CRMD_CUSTOMER_H Additional Site Details at the Header Level of a Business Transaction
CRMD_LINK Transaction GUID set for all the Business Transactions
CRMD_ORDER_INDEX Contains Header as well as Item details for a Business Transaction.
Note:
1. It doesnt store the Business
Transaction No (Object ID).
To get the Business Transaction No
link the table with
CRMD_ORDERADM_H
2. This table can be used for search
based on the Partner No
CRMD_ORDERADM_I Stores the Item information for a Business Transaction. The scenarios where we have a Contract Header and within contract we have Line Items for the contract, this table can be useful.
E.g. Service Contracts
CRMD_CUSTOMER_I Additional Site Details at the Item Level of a Service Contract
Pl.reward points....... -
How to populate smart form with new values
Hi!
I am new to smart form . Can anybody help me in how to populate smart form with some new fileds. Actually i have to populate credit memo form with some customized values..Hello,
Please elaborate your query more in order to be comprehendable.
Regards,
Shehryar -
How to extract tax amount in item level from a Purchase order
Hi experts,
How to extract the tax amount data for each item in a Purchase order.
I am using the data sources 2lis_02_itm, 2lis_02_scl, 2lis_02_S012.
Please provide me which data source brings this tax amount data in item level and also the technical
field name of tax amount.
<Removed by moderator - soliciting points for answers is frowned upon>
Regards,
Bhadri M.
Edited by: Arun Varadarajan on Nov 14, 2008 3:55 PMDear Bhadri
Did you look 2LIS_13_VDKON data source whther it can throw or not for billing related. Here you should look some billing conditions relates to particular document like taxable or not.
(KAWRT, KAWRT_K, BIWGEO)
Those informations will be maintained each with billing conditions.
May not sure. Please look.
Raju Saravanan -
How to convert Smart Form into PDF format and return the result in BAPI?
I want to convert a Smart Form into PDF format and return the result in BAPI.
can anyone tell me how it can be done with related example
regards
pranayhi,
smart form to pdf--
All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
DATA: p_output_options TYPE ssfcompop,
p_control_parameters TYPE ssfctrlop.
p_control_parameters-no_dialog = 'X'.
p_control_parameters-getotf = 'X'.
CALL FUNCTION v_func_name "call your smartform
EXPORTING
output_options = p_output_options
control_parameters = p_control_parameters
IMPORTING
job_output_info = s_job_output_info.
call function 'CONVERT_OTF_2_PDF'
tables
otf = s_job_output_info-otfdata
lines = t_pdf
and if u need more u can check below links also
Check the below links..
Re: Smartforms to PDF
Re: smartform (otf) as pdf and sending as email-attachment
VISIT THIS LINK
Re: Smartforms to PDF
PLZ REWARD POINTS IF IT HELPS YOU
rgds
anver -
How to display smart form stored in SAP in Webdynpro java( TLINE table)
Hi
I have a requirement where I have to display the smart form from WD Java end.
The BAPI is producing output in TLINE(TDLINE(132),TDFORMAT(2)). I am trying to concat both(TDLINE+TDFORMAT) and put in the interactive form but I am not able to get the output from BAPI.
Is it because the TLINE format is not supported in the WD java. How can I solve the issue.
Looking forward for the reply.
Regards,
PawanHi..
Try this PDF URL.... u might get useful things...
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
Web Dynpro Java
yours GS -
How to display Smart form in Multiple Languages ?
Hello,
Very Good evening!
How can I print the Smart Form in Multiple Languages like Korea, German and Japneese....
I got a requirement where I need to display the developed Smart form in these languages. As of now it is displayed only in the Language ENGLISH.
Any Suggestions will be appreciated!
Regards,
KittuHello kittu....
I would recommend that you create a single Smart Form in the primary supported language (or the one which you're most comfortable maintaining forms). Embed all necessary logic in this form, and design it with the idea that it would need to be viewable in multiple languages .
Then use transaction SE63 to translate all necessary form components into each desired language -- one by one -- and they will all be bound together under the same form name. In my experience, a basic multi-column spreadsheet (put together with the guidance of professional translators) works well as a translation guide.
The advantages of a single, shared form include: consistent look and feel, avoiding dual maintenance for shared logic (or, in your case, up to 10x maintenance), and simplified output determination. On the other hand, a single form does constrain your design and can make for a more complex implementation.
Hope this is useful
Best of luck,
Bhumika -
How to user Smart form for the BID in SRM 4.0
Hello,
We have SRM 4.0 and we need to send the BID information to the vendor. This is because we have vendors that are not able to get in to our system and we have to send them a print out of the bid information so that they give us back the information. Then our users will insert it in the system.
It could be as an attach to the email or it could be printable in the program SPPS - Selecting and Processing Outputs.
SAP says that there is a smart form BBP_BIDINV_BID and BBP_BID_NOTIFICATION but I am not managing to make them work.
I found some messages to help solving specific problems so I assume it is possible to do this...
Is there someone that can help me?
Thanks very much.
My best regards,
Catarina CamposHi
<u><b>Here is the standard solution to use your own forms:-></b></u>
<u>- copy the smartform BBP_BIDINV_BID to ZBBP_BIDINV_BID (transaction SMARTFORMS) and apply your changes
- use BADI to call your custom form ZBBP_BIDINV_BID</u>
<b>For PDF output form change use BADI BBP_OUTPUT_CHANGE_SF.</b>
<b>For email notification change use BADI BBP_CHANGE_SF_BID instead.</b>
<u>You will find all relevant documentation in SPRO --> Supplier Relationship Management --></u>
SRM Server --> Business Add-Ins (BAdIs) --> Document Output -->
- Change Forms for Document Output
- Change Smart Form for E-Mails Relating to Bids
<u><b>Please go through the links below for more details -></b></u>
Re: how to use cutom smartform instead standard?
Re: Email message customization ?
Re: Bid Invitation Email Subject
Re: Email notification to bidder should reflect start/end date and time
Re: RFQ Smartform in SRM
Re: Standard Text
Do let me know.
Regards
- Atul -
How to Call smart form in Action
Hi All,
Could some one tell me how to call the smart form in action.
Eg. PB40 - Offer Contract Action.
Appreciate your respnse.
Regards
RajHi ,
attached you find some abap code to call a smartform with some comments in it. Hope that helps:
DATA: l_fn_name TYPE rs38l_fnam
, l_devtype TYPE rspoptype
, ls_output_options TYPE ssfcompop
, ls_control_parameters TYPE ssfctrlop
, ls_job_output_info TYPE ssfcrescl
, l_pdf_fsize TYPE i "#EC NEEDED
, lt_otf_tab TYPE tsfotf
, lt_pdf_lines TYPE TABLE OF tline
To do
The mapping from the UI structure to the Smortform structure has to be
implemented here or in a pirvate method.....
Call function module u201CSSF_FUNCTION_MODULE_NAMEu201D to get the name of the smartform.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = zh38tm_cl_zz_2gen_bl_constants=>c_smartforms_hipo
IMPORTING
fm_name = l_fn_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc = 0.
Call function module u201CSSF_GET_DEVICE_TYPEu201D to get the print parameter
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = sy-langu
IMPORTING
e_devtype = l_devtype
EXCEPTIONS
no_language = 1
language_not_installed = 2
no_devtype_found = 3
system_error = 4
OTHERS = 5.
IF sy-subrc = 0.
Fill label structure to smartform
ls_labels = zh38pm_cl_zz_bl_perf_plan=>set_sf_label( ).
Set output parameters u201CLANGUAGEu201D, u201CNO_DIALOGu201D and u201CGETOTFu201D
ls_output_options-tdprinter = l_devtype.
ls_control_parameters-no_dialog = abap_true.
ls_control_parameters-getotf = abap_true.
ls_control_parameters-langu = sy-langu.
Call smartform with the structures u201CIMP_S_PERF_PLANu201D, u201CCHG_S_PRINT_PLAN
CALL FUNCTION l_fn_name
EXPORTING
control_parameters = ls_control_parameters
output_options = ls_output_options
s_doc_processing = gs_doc-s_doc_processing
s_header_display = gs_doc-s_header_display
s_header_texts = gs_doc-s_header_texts
s_header_status = gs_doc-s_header_status
t_header_appraiser = gs_doc-t_header_appraiser
t_header_appraisee = gs_doc-t_header_appraisee
t_header_part_appraiser = gs_doc-t_header_part_appraisers
t_header_other = gs_doc-t_header_others
s_header_dates = gs_doc-s_header_dates
t_header_add_data = gs_doc-t_header_add_data
t_body_columns = gs_doc-t_body_columns
t_body_element_descr = gs_doc-t_body_element_descr
t_body_elements = gs_doc-t_body_elements
t_body_cells = gs_doc-t_body_cells
t_body_cell_notes = gs_doc-t_body_cell_notes
t_body_cell_val_values = gs_doc-t_body_cell_val_values
t_body_cell_val_ranges = gs_doc-t_body_cell_val_ranges
t_body_cell_val_c_like = gs_doc-t_body_cell_val_c_like
t_body_cell_val_descr = gs_doc-t_body_cell_val_descr
IMPORTING
job_output_info = ls_job_output_info
EXCEPTIONS
formattinl_error = 1
internal_error = 2
send_error = 3
user_canceled = 4.
IF sy-subrc = 0.
APPEND LINES OF ls_job_output_info-otfdata TO lt_otf_tab.
exp_t_otf = lt_otf_tab.
Call function module u201CCONVERT_OTFu201D to convert the smartform data
to exporting parameter u201CEXP_PDF_XSTRING
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = l_pdf_fsize
bin_file = exp_pdf_xstring
TABLES
otf = lt_otf_tab
lines = lt_pdf_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc ne 0.
CLEAR exp_pdf_xstring.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
First you have to determine the smartforms function modules name the wxecute it. -
Survey Form at item level is not visible
Hi Experts,
I have created two survey forms for lead. I want different survey form based upon item category.
But, In my Lead transaction NO survey form is visible at item level. its visible at header level only.
I want it at item level.
Please help.
Regards,
AnkushHave you got solution for your question
-
How to Download Smart Form in 4.6C.
Hi all,
I am using the version 4.6C.
Is there any standrd program like in SAP SCRIPTS to download the smart form layout to desktop later can upload to SAP.
In 4.7 have a option to downloadand upload but how to do it in 4.6C?
Any Ideas from your side? please let me know
Thanks
Martin.
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jan 8, 2009 11:25 AMtry this program "ZI_LOAD_SMARTFORMS_AND_STYLES"
How could he try it...If it's a Z program?
Greetings,
Blag. -
Hi there,
How to save the samrt forms. I mean not only download the forms but also save the program in the samrt forms.
Any good solution, i appreciate that.
KevinHI
TO save smart forms goto
Utilities->Download form
this will do for u , it will save as a xml file.
if u want to up load it
Utilities->upload
it will up load the xml file which is down loaded
byee
all the best -
plz tell me how to debugg smart forms
Hi Kalyan,
In the Smartform, within the Code Node you can hardcode a normal abap Break Point ..
Please set a break point in side the smartform:
BREAK <USERNAME>.
Then at the time of print/ preview the program stops there.
Example : If you set the break point in initializationas
BREAK <USERNAME>.
Program stops at break point. After that use Serach and set more break points.
>Search the program logic/Textelement/Address via search and set the break point at that code.
Other way to debug smartform is to debug the Function Module of that smartforms. If you want to debug particular smartform node that the solution would be, insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint. So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.
or
SFTRACE can be used for debugging SMARTFORMS.
Read More here.
http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
See the Below thread for how to debug the Smartforms
How to Debug Smartform?
Re: debug of smartfrom
Smart forms
Regards,
KK -
How to use smart form for production orders
Hello Experts,
I have a couple of questions about printing out production orders from SAP, from OPK8.
My ABAPer has developed a smart form and I am trying to use the same for the list LG01, i.e. the object list.
Since, there was no place to assign a smart form directly, so the ABAPer has copied the existing print program , defined for my ref. order type and LG01 and assigned the new smart form inside the program. This new program has now been assigned against my ref. ord type, LG01 and all the plants, as seen in screenshot below.
Now, what is happening is that when I give print for my order, a pop-up screen asks for the printer. I give LOCL , check 'print now' and then click on the print preview.
I can see the new form that has been developed and it is alright.
Then, when I click on the back arrow, once again the print pop-up screen appears. Now, when I enter LOCL, print now and click the print preview, then I see another form open up before me. I am assuming that this is some form which was pre-configured in the system, under the section 'Forms', for the same object list LG01.
Do I have to assign the new smart form under the section "Forms' also, for the ref order type and LG01? or the change in the section 'print programs' is enough for the new form to kick in? Please guide me. I tried to but it gave the error that the form is not created in English. Also , my form is a smart form, not a SAPScript or PDF form, so I wonder if that will help at all.
Requirement :- I need to suppress this second form somehow but do not know how to do it. I want that only one form, i.e. my smart form should be printed out when someone gives print from the order.
Let me know if something is not clear.
Regards
P.RHi P,
Go a few steps down and remove flags on the documents you don't want to print:
this are just suggestions, they can be changed in your production order, in CO02, menu Order->Settings->List Control.
regards,
Edgar
Maybe you are looking for
-
Using iPod as a disk (and only a disk)
I've got an iPod 4G, connected to Leopard. I want to use this as an ordinary external usb drive. I'm positive I've done this before (used to to beta test Leopard actually). Anyway, I'm having some trouble doing it again. In Disk Utility I've selected
-
Top level navigation repeat tab
Hi Guys, Simple one here, just cant point my fingers to it. The top level navigation tab in my portal is repeating itsself. There are 1 additional set of tabs. HOw do i sort this out? thanks regards, johan
-
Best way to implement 100% discount in Pricing Prod based on Customer
What would be the simplest way to implement 100% discount based on customer. I was thinking to do it via Customer Hierarchy... Suggestions are appreciated.. Message was edited by: Robert Robbin
-
Can mail be forwarded as an attachment?
In order to forward SPAM to my ISP I have to forward the spam as an attachment in RFC_822 MIME format. Can this be done with Apple Mail in Tiger? If so, how? (It is a simple endeavor in practically every other mail app on the PC, but I cannot seem to
-
How do i fix an error code -1202 please
Hi Can anyone help with info on how to fix an error code -1202 please