Smartform Grouping
Dear All
using sap smartform, developed the sd invoice printout as below, but while printing same product is printing is multiple line due to batch no based, (batch number not printed in the invoice output) how to print same in single line material wise,
please suggest!!!!
Existing
=============================================
S.No--Material Description--
Qty
=============================================
10-- WHOLE MILK POWDER - 25 KG-- 0
11-- WHOLE MILK POWDER - 25 KG-- 22
12-- WHOLE MILK POWDER - 25 KG-- 2
13-- WHOLE MILK POWDER - 25 KG-- 1
*21-- Butter 20 KG (Salted) 1-- EA*
*22-- Butter 20 KG (Salted) 1-- EA*
*23-- Butter 20 KG (Salted) 1-- EA*
*24-- Butter 20 KG (Salted) 1-- EA*
*25-- Butter 20 KG (Salted) 1-- EA*
*26-- Butter 20 KG (Salted) 1-- EA*
*27-- Butter 20 KG (Salted) 1-- EA*
*28-- Butter 20 KG (Salted) 1-- EA*
*29-- Butter 20 KG (Salted) 1-- EA*
*30-- Butter 20 KG (Salted) 1-- EA*
*31-- Butter 20 KG (Salted) 1-- EA*
=============================================
Required Like
=============================================
S.No--Material Description--
Qty
=============================================
1-- WHOLE MILK POWDER - 25 KG-- 25
2----
Butter 20 KG (Salted) -
11
=============================================
thanks
anandavel.c
You can Either sum up the Quantity according to material in your driver program (Use logic, or use of aggregate function like AT NEW, AT END etc...)...into new internal table and pass it to SMARTFORM OR
Use Logic in SMARTFORM to aggregate Quantity and print Quantity only on change of Material...You might need to set some flags for change of Material and put condition on all relevant nodes to check for those flags.
If you are having driver program, I would suggest first method.
Thanks,
Regards,
Mohaiyuddin
Similar Messages
-
Are there a pre configured package with a group of common smartforms ?
Hi,
Could you please tell me if there exits a package with a set of common smartforms?, i read that in saplabs were avaliable... but i have not founded it...
Could you give me the link where i can found it?
I looked for... but i have not founded it.
Thanks in advance!.
Regards,
Albio.-Hi!
You can find it at:
http://service.sap.com/installations
in menu choose "Entry by Application Group" -> "SAP Best Practices" -> "Best Practices for mySAP All-in-One" -> "PRECONFIGURED SMART FORMS" -
Standard smartform for application V5-Groups. and Output type LL00.
Hi,
I want the name of standard smartform for application V5-Groups. and Output type LL00.
I need to print Ship to party address of Multiple Deliveries.
Can anyone tell me the standard form name and Print program name.
Regards,
RajenderHi Lavanya,
SD_LOADING_LIST is a script.
Can you please provide me with a standard smartform as we need to develop this in smartform only.
Thanks,
Rajender. -
Smartform line item -group total
Hai All,
I need logic for the following requirement in smartform,
I should print the subtotal of each group of line items that i have calculated in my report.\
for example Group-A has 1,2,3 line items.now i should print t total at the end of this particular group item in SMF.
similarly Group-B has 1,2,3,4 line items.now i should print t total at the end of this particular group item in SMF .Hi,
If you have the Driver program, then do the logic in your driver program and finally print those details in the smartform.
sort itab by group.
Loop at itab assigning <fs_tab>.
v_total = v_total + <fs_tab>-field.
at end of Group.
<fs_tab>-newfield = v_total.
clear v_total.
endat.
endloop.
Now use this new field in your smartform to print the totals.
Regards,
Venkatesh -
Smartform issue with page break
Hi All,
I have an unusual issue with page break. Here is my scenario, I have a group of items in my table main area and for each group there is sort of header that prints. Similarly there are multiple groups needing a header whenever there is a new group printing. So far it prints fine. But whenever there is a page break and when items from the same group also print on the next page the same header needs to print on the top of next page similar to how the header area repeats on each page. Unfortunately I did not see any page break event for table main area.
Here is an alternative I have tried but having issues: I have created two rows for this group header one printing from header and another printing from main area. Whenever there is a page break the same group header prints as part of the header and on the rest of the page it prints from the main area. But in a particular scenario, there is a new group starting at almost bottom of the page but as there is not enough space left on the same page (page protection) jumps to next page. In this case there are two group headers printed one coming from the preivous page main area and another coming from the next page header. I hope my explanation is clear enough to understand.
Please suggest if there is any basic feature of smartform that I have missed out can solve this issue or if there is another alternative you can think of. I appreciate your responses.
Thanks..I was able to solve this issue on my own.
Instead of checking for a page break on header line I am using a flag that is prepopulated in the table. I set this flag whenver a new group of items starts. If the flag is set I print it from the main area and if it is not set I print it from the header. This helped in avoiding the multiple header lines.. -
Smartforms issue urgentttt....
Hi All,
This is a very urgent scenario which need to be resolved as soon as possible. Please go through the following.
I am trying to take a print of philippines TDS form using a transaction S_P00_07000134 - Generic Withholding Tax Reporting. After entering the values related to philippines and selecting form tab when i view the print, i find only vendor and payor details in the form not the line items which are visible in report.Could you please update me on this scenario as we are in GOLIVE phase. The Form name is IDWTCERT_PH_2307.
TCode: S_P00_07000134 - Generic Withholding Tax Reporting
Input Values
Process type: std
Output Group:ph2
Country Key:ph
Reporting Period:01.04.2008 to 22.04.2008
Company Code: 1100
Vendor:600001
In forms tab
Selected Print Form1
Number of copies: 1
Output Device: local
execution of this values(F8)
selected print or print preview
output will be displayed or printed with out line items and when we press back we find the regular report with line items.
Could anyone give me the solution it is very urgent....
regards
PSNGI am able to do this part.What is getting stuck is that i have say 5 totals with me and i pass to internal table then how can i fetch from smartform.If i create a structure for this internal table either way doesnot work i tried F1 like bseg-dmbtr and mseg-menge ie amount in currency as well as menge i tried.Failure occurs in smartforms as it fails to recognize the field itself.
-
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 -
Smartform report generation error
Hi,
I have a problem with a report calling a smartform. The report works perfectly on the 1 system but on the other system there is a generation error. I found that the problem lies with the following declaration:
data: otf_info type SSFCRESCL.
I compared the structures on the different systems and they are identical. The only difference is the Support Package levels. The error occurs on the system with the higher support package - SAPKB64015 (basis and aba) whereas the other system is still at level 12 (SAPKB64012).
Any ideas what is causing the generation error and what could be done to fix it?
Regards
Liza-MarieHi ,
I think there may be some errors in function group errors.
Try the following :
T/Code : SMARTFORMSEnter the name of the form> Test--> This will leads to function module --> Utilities(Menubar)-=-> Repair function group --> Repair.
After repairing the function group --> Save and Activate.
Then transport the Smartform to other system .
Regards,
Lanka -
Report on Smartform..To make it efficient by removing SELECT ,ENDSELECT
To make a smartform report efficient by removing all occurs & modify internal table statements.
What i have been given to do is to select all data from respective tables put them into one internal table & then finally making tab2 or tab3 in the report to be the final table.I am not sure which among these two i can make final table.
THE CODE is:
REPORT zgr_note.
TABLES : mseg, "Document Segment : Material
prps, "WBS element master data
proj, "Project Definition
mkpf, "Header : Material Document
lfa1, "Vendor Master
makt, "Material Description
aufk, "Order Master Data
afvc. "Operation within an order
DATA : fname LIKE rs38l-name. "Name of Function Module
DATA: lf_fm_name TYPE rs38l_fnam.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: lf_formname TYPE tdsfname.
DATA: ls_addr_key LIKE addr_key.
DATA: ls_dlv_land LIKE vbrk-land1.
DATA: ls_job_info TYPE ssfcrescl.
DATA: ls_otpt_opt TYPE ssfcompop.
DATA: retcode TYPE sy-subrc.
DATA: cntr TYPE i VALUE 0.
DATA: cntr1 TYPE i .
DATA: number TYPE SSFCRESCL-SPOOLIDS. " OCCURS 0 WITH HEADER LINE.
DATA: TSP01 type TABLE OF TSP01_SP0R.
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE mseg.
DATA : post1 LIKE proj-post1, "Project Definition
pspnr LIKE proj-pspnr, "WBS element
maktx LIKE makt-maktx, "Material Description
name1 LIKE lfa1-name1, "Name of the supplier
budat LIKE mkpf-budat, "Posting date
bldat LIKE mkpf-bldat, "Document date
cpudt LIKE mkpf-cpudt, "Date on which account document was entered
psphi LIKE prps-psphi, "Current number of project
post2 LIKE prps-post1, "WBS Definition
xblnr LIKE mkpf-xblnr, "Reference number( in this case challan number)
bktxt LIKE mkpf-bktxt, "Header text
ort01 LIKE lfa1-ort01, "vendor city
ktext LIKE aufk-ktext, "network description
ltxa1 LIKE afvc-ltxa1. "operation short text
DATA : END OF itab.
DATA : BEGIN OF jtab OCCURS 0.
INCLUDE STRUCTURE itab.
DATA : END OF jtab.
DATA : itab1 LIKE itab OCCURS 0
WITH HEADER LINE.
DATA :itab2 LIKE itab OCCURS 0
WITH HEADER LINE.
DATA: itab3 LIKE itab OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text_001.
SELECT-OPTIONS : gr_num FOR mseg-mblnr . "no INTERVALS.
PARAMETERS : gr_note LIKE itemset-xopsel RADIOBUTTON GROUP rad1.
SELECTION-SCREEN SKIP.
SELECT-OPTIONS : mat_num FOR mseg-mblnr . "no INTERVALS.
PARAMETERS : mat_slip LIKE itemset-xopsel RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN SKIP.
CASE 'X'.
WHEN gr_note.
PERFORM gr_display.
WHEN mat_slip.
PERFORM mat_display.
ENDCASE.
FORM gr_display .
*break developer1.
SELECT mblnr mjahr matnr werks lgort lifnr menge meins
erfmg bpmng ebeln ps_psp_pnr zeile lsmng erfme
FROM mseg
INTO CORRESPONDING FIELDS OF TABLE itab
WHERE mblnr IN gr_num.
LOOP AT itab.
SELECT pspnr psphi post1 INTO CORRESPONDING FIELDS OF itab1
FROM prps WHERE pspnr = itab-ps_psp_pnr.
itab-psphi = itab1-psphi.
itab-pspnr = itab1-pspnr.
itab-post2 = itab1-post1.
MODIFY itab TRANSPORTING psphi pspnr post2.
ENDSELECT.
SELECT post1 FROM proj INTO CORRESPONDING FIELDS OF itab2
WHERE pspnr = itab-psphi.
itab-post1 = itab2-post1.
MODIFY itab TRANSPORTING post1.
ENDSELECT.
REFRESH itab2.
SELECT maktx FROM makt INTO CORRESPONDING FIELDS OF itab2
WHERE matnr = itab-matnr.
itab-maktx = itab2-maktx.
MODIFY itab TRANSPORTING maktx.
ENDSELECT.
REFRESH itab2.
SELECT name1 ort01 FROM lfa1 INTO CORRESPONDING FIELDS OF itab2
WHERE lifnr = itab-lifnr.
itab-name1 = itab2-name1.
itab-ort01 = itab2-ort01.
MODIFY itab TRANSPORTING name1 ort01.
ENDSELECT.
REFRESH itab2.
SELECT budat bldat cpudt xblnr bktxt FROM mkpf
INTO CORRESPONDING FIELDS OF itab2
WHERE mblnr = itab-mblnr.
itab-budat = itab2-budat.
itab-bldat = itab2-bldat.
itab-cpudt = itab2-cpudt.
itab-xblnr = itab2-xblnr.
itab-bktxt = itab2-bktxt.
MODIFY itab TRANSPORTING budat bldat cpudt xblnr bktxt.
ENDSELECT.
ENDLOOP.
LOOP AT itab .
ON CHANGE OF itab-mblnr.
itab3-mblnr = itab-mblnr.
itab3-post1 = itab-post1.
itab3-post2 = itab-post2.
itab3-name1 = itab-name1.
itab3-ort01 = itab-ort01.
itab3-bldat = itab-bldat.
APPEND itab3.
CLEAR itab3.
ENDON.
ENDLOOP.
jtab-mblnr = itab-mblnr.
jtab-xblnr = itab-xblnr.
jtab-budat = itab-budat.
jtab-bktxt = itab-bktxt.
jtab-lsmng = itab-lsmng.
jtab-erfmg = itab-erfmg.
jtab-erfme = itab-erfme.
jtab-matnr = itab-matnr.
jtab-maktx = itab-maktx.
jtab-zeile = itab-zeile.
APPEND jtab.
LOOP AT itab3.
CLEAR: itab2,itab2[].
LOOP AT itab WHERE mblnr = itab3-mblnr.
MOVE-CORRESPONDING itab TO itab2.
APPEND itab2.
CLEAR itab2.
ENDLOOP.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMM_GOODS_RECEIPT1'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fname
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.
*break developer1.
PERFORM print_parameters.
CALL FUNCTION fname
EXPORTING
control_parameters = ls_control_param
output_options = ls_otpt_opt
user_settings = 'X'
gr_mseg_hdr = itab3
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
gr_mseg = itab2
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.
ENDFORM. " GR_DISPLAY
FORM mat_display .
SELECT mblnr mjahr matnr werks lgort lifnr menge meins
erfmg bpmng ebeln ps_psp_pnr zeile lsmng erfme
mat_pspnr nplnr aufpl aplzl
FROM mseg
INTO CORRESPONDING FIELDS OF TABLE itab
WHERE mblnr IN mat_num.
LOOP AT itab.
SELECT ltxa1 FROM afvc INTO CORRESPONDING FIELDS OF itab1
WHERE aufpl = itab-aufpl AND aplzl = itab-aplzl.
itab-ltxa1 = itab1-ltxa1.
MODIFY itab TRANSPORTING ltxa1.
ENDSELECT.
REFRESH itab1.
SELECT ktext FROM aufk INTO CORRESPONDING FIELDS OF itab1
WHERE aufnr = itab-nplnr.
itab-ktext = itab1-ktext.
MODIFY itab TRANSPORTING ktext.
ENDSELECT.
REFRESH itab1.
SELECT pspnr psphi post1 INTO CORRESPONDING FIELDS OF itab1
FROM prps WHERE pspnr = itab-mat_pspnr.
itab-psphi = itab1-psphi.
itab-pspnr = itab1-pspnr.
itab-post2 = itab1-post1.
MODIFY itab TRANSPORTING psphi pspnr post2.
ENDSELECT.
SELECT post1 FROM proj INTO CORRESPONDING FIELDS OF itab2
WHERE pspnr = itab-psphi.
itab-post1 = itab2-post1.
MODIFY itab TRANSPORTING post1.
ENDSELECT.
REFRESH itab2.
SELECT maktx FROM makt INTO CORRESPONDING FIELDS OF itab2
WHERE matnr = itab-matnr.
itab-maktx = itab2-maktx.
MODIFY itab TRANSPORTING maktx.
ENDSELECT.
REFRESH itab2.
SELECT name1 ort01 FROM lfa1 INTO CORRESPONDING FIELDS OF itab2
WHERE lifnr = itab-lifnr.
itab-name1 = itab2-name1.
itab-ort01 = itab2-ort01.
MODIFY itab TRANSPORTING name1 ort01.
ENDSELECT.
REFRESH itab2.
SELECT budat bldat cpudt xblnr bktxt FROM mkpf
INTO CORRESPONDING FIELDS OF itab2
WHERE mblnr = itab-mblnr.
itab-budat = itab2-budat.
itab-bldat = itab2-bldat.
itab-cpudt = itab2-cpudt.
itab-xblnr = itab2-xblnr.
itab-bktxt = itab2-bktxt.
break developer1.
MODIFY itab TRANSPORTING budat bldat cpudt xblnr bktxt.
ENDSELECT.
ENDLOOP.
LOOP AT itab.
ON CHANGE OF itab-mblnr.
itab3-mblnr = itab-mblnr.
itab3-budat = itab-budat.
itab3-bldat = itab-bldat.
itab3-post1 = itab-post1.
itab3-ktext = itab-ktext.
APPEND itab3.
CLEAR itab3.
ENDON.
ENDLOOP.
LOOP AT itab3.
CLEAR: itab2, itab2[].
LOOP AT itab WHERE mblnr EQ itab3-mblnr.
MOVE-CORRESPONDING itab TO itab2.
APPEND itab2.
CLEAR itab2.
ENDLOOP.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMM_MAT_ISSUE_SLIP'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fname
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_control_param-no_dialog = 'X'.
*ls_control_param-preview = 'X'.
*ls_control_param-getotf = 'X'.
ls_otpt_opt-tdnoprev = 'X'.
ls_otpt_opt-tdnewid = ''.
ls_otpt_opt-tdimmed = 'X'.
ls_otpt_opt-tddest = 'LP01'.
CALL FUNCTION fname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = ls_control_param
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = ls_otpt_opt
user_settings = 'X'
mat_slip_hdr = itab3
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = ls_job_info
JOB_OUTPUT_OPTIONS =
TABLES
mat_slip = itab2
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.
ENDFORM.Hello Saswat,
There are a couple of criteria to make a SmartForm report efficient, i.e. to achieve a better performance:
- provide the best possible interface to the temporary FM (fname). When you do so, SmartForm itself has not to perform so much programming stuff by itself.
- The Driver program (zgr_note) has to be designed and coded well. What mean the performance of the Driver has to be optimized. In your case there should be a couple of performance improvements:
-- adjust your program declaration to the new ABAP syntax, i.e. don't use OCCURS clauses and do not use HEADER LINE. Instead, implement TYPES and use them. Here is an example:
TYPES: BEGIN OF ty_itab.
INCLUDE STRUCTURE mseg.
TYPES: post1 LIKE proj-post1, "Project Definition
pspnr LIKE proj-pspnr, "WBS element
maktx LIKE makt-maktx, "Material Description
name1 LIKE lfa1-name1, "Name of the supplier
budat LIKE mkpf-budat, "Posting date
bldat LIKE mkpf-bldat, "Document date
cpudt LIKE mkpf-cpudt, "Date on which account document was entered
psphi LIKE prps-psphi, "Current number of project
post2 LIKE prps-post1, "WBS Definition
xblnr LIKE mkpf-xblnr, "Reference number( in this case challan number)
bktxt LIKE mkpf-bktxt, "Header text
ort01 LIKE lfa1-ort01, "vendor city
ktext LIKE aufk-ktext, "network description
ltxa1 LIKE afvc-ltxa1, "operation short text
END OF ty_itab.
* Declare your internal tables and the corresponding working structures
DATA: itab1 type standard table of ty_itab,
itab2 type standard table of ty_itab,
itab3 type standard table of ty_itab,
jtab type standard table of ty_itab,
wa_itab1 type ty_itab,
wa_itab2 type ty_itab,
wa_itab3 type ty_itab,
wa_jtab type ty_itab.
-- Don't use
LOOP at itab.
SELECT ...... WHERE pspnr = itab-ps_psp_pnr.
ENDSELECT.
SELECT * ...
ENDSELECT
SELECT * .....
ENDSELECT
ENDLOOP.
Instead try to populate itab, itab1, itab2 each in ONE select statement using FOR ALL ENTRIES clause. After that you have to perform the LOOP runs using LOOP at itab INTO wa_itab. The more redundant SELECTs, the slower the program! When you perform a LOOP run, let say over itab1 and you need a corresponding record from table itab2 the use READ <itab> with key.
One additional, very important hint: Using internal tables w/o header line the CLEAR statement has another functionality than with HEADER LINE
CLEAR with HEADER LINE clears the HEADER line only
CLEAR w/o HEADER LINE clears the entire table. CLEAR does the same as REFRESH.
Another performance improvement is (when itab contains a lot of records) using FIELD-SYMBOLS.
A simple example is
FIELD-SYMBOLS: <fs> type itab.
LOOP at itab assigning <fs>.
wa_itab3-post1 = <fs>-post1.
wa_itab3-post2 = <fs>-post2.
APPEND wa_itab3 to itab.
ENDLOOP.
In this case no data values have to be transfered to a working field. The values are taken directly from the current line of the internal table.
-- For better readability disign some events like START-OF-SELECTION, END-OF-SELECTION, INITIALIZATION and others.
Try to gather all in SmartForms needed fields and pop them into table itab3.
I hope this helps improving zgr_note's efficiency.
Good luck,
Heinz -
Report on smartform.Replace select endselect with something to efficient it
To make a smartform report efficient by removing all occurs & modify internal table statements.
What i have been given to do is to select all data from respective tables put them into one internal table & then finally making tab2 or tab3 in the report to be the final table.I am not sure which among these two i can make final table.
THE CODE is:
REPORT zgr_note.
TABLES : mseg, "Document Segment : Material
prps, "WBS element master data
proj, "Project Definition
mkpf, "Header : Material Document
lfa1, "Vendor Master
makt, "Material Description
aufk, "Order Master Data
afvc. "Operation within an order
DATA : fname LIKE rs38l-name. "Name of Function Module
DATA: lf_fm_name TYPE rs38l_fnam.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: lf_formname TYPE tdsfname.
DATA: ls_addr_key LIKE addr_key.
DATA: ls_dlv_land LIKE vbrk-land1.
DATA: ls_job_info TYPE ssfcrescl.
DATA: ls_otpt_opt TYPE ssfcompop.
DATA: retcode TYPE sy-subrc.
DATA: cntr TYPE i VALUE 0.
DATA: cntr1 TYPE i .
DATA: number TYPE SSFCRESCL-SPOOLIDS. " OCCURS 0 WITH HEADER LINE.
DATA: TSP01 type TABLE OF TSP01_SP0R.
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE mseg.
DATA : post1 LIKE proj-post1, "Project Definition
pspnr LIKE proj-pspnr, "WBS element
maktx LIKE makt-maktx, "Material Description
name1 LIKE lfa1-name1, "Name of the supplier
budat LIKE mkpf-budat, "Posting date
bldat LIKE mkpf-bldat, "Document date
cpudt LIKE mkpf-cpudt, "Date on which account document was entered
psphi LIKE prps-psphi, "Current number of project
post2 LIKE prps-post1, "WBS Definition
xblnr LIKE mkpf-xblnr, "Reference number( in this case challan number)
bktxt LIKE mkpf-bktxt, "Header text
ort01 LIKE lfa1-ort01, "vendor city
ktext LIKE aufk-ktext, "network description
ltxa1 LIKE afvc-ltxa1. "operation short text
DATA : END OF itab.
DATA : BEGIN OF jtab OCCURS 0.
INCLUDE STRUCTURE itab.
DATA : END OF jtab.
DATA : itab1 LIKE itab OCCURS 0
WITH HEADER LINE.
DATA :itab2 LIKE itab OCCURS 0
WITH HEADER LINE.
DATA: itab3 LIKE itab OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text_001.
SELECT-OPTIONS : gr_num FOR mseg-mblnr . "no INTERVALS.
PARAMETERS : gr_note LIKE itemset-xopsel RADIOBUTTON GROUP rad1.
SELECTION-SCREEN SKIP.
SELECT-OPTIONS : mat_num FOR mseg-mblnr . "no INTERVALS.
PARAMETERS : mat_slip LIKE itemset-xopsel RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN SKIP.
CASE 'X'.
WHEN gr_note.
PERFORM gr_display.
WHEN mat_slip.
PERFORM mat_display.
ENDCASE.
FORM gr_display .
*break developer1.
SELECT mblnr mjahr matnr werks lgort lifnr menge meins
erfmg bpmng ebeln ps_psp_pnr zeile lsmng erfme
FROM mseg
INTO CORRESPONDING FIELDS OF TABLE itab
WHERE mblnr IN gr_num.
LOOP AT itab.
SELECT pspnr psphi post1 INTO CORRESPONDING FIELDS OF itab1
FROM prps WHERE pspnr = itab-ps_psp_pnr.
itab-psphi = itab1-psphi.
itab-pspnr = itab1-pspnr.
itab-post2 = itab1-post1.
MODIFY itab TRANSPORTING psphi pspnr post2.
ENDSELECT.
SELECT post1 FROM proj INTO CORRESPONDING FIELDS OF itab2
WHERE pspnr = itab-psphi.
itab-post1 = itab2-post1.
MODIFY itab TRANSPORTING post1.
ENDSELECT.
REFRESH itab2.
SELECT maktx FROM makt INTO CORRESPONDING FIELDS OF itab2
WHERE matnr = itab-matnr.
itab-maktx = itab2-maktx.
MODIFY itab TRANSPORTING maktx.
ENDSELECT.
REFRESH itab2.
SELECT name1 ort01 FROM lfa1 INTO CORRESPONDING FIELDS OF itab2
WHERE lifnr = itab-lifnr.
itab-name1 = itab2-name1.
itab-ort01 = itab2-ort01.
MODIFY itab TRANSPORTING name1 ort01.
ENDSELECT.
REFRESH itab2.
SELECT budat bldat cpudt xblnr bktxt FROM mkpf
INTO CORRESPONDING FIELDS OF itab2
WHERE mblnr = itab-mblnr.
itab-budat = itab2-budat.
itab-bldat = itab2-bldat.
itab-cpudt = itab2-cpudt.
itab-xblnr = itab2-xblnr.
itab-bktxt = itab2-bktxt.
MODIFY itab TRANSPORTING budat bldat cpudt xblnr bktxt.
ENDSELECT.
ENDLOOP.
LOOP AT itab .
ON CHANGE OF itab-mblnr.
itab3-mblnr = itab-mblnr.
itab3-post1 = itab-post1.
itab3-post2 = itab-post2.
itab3-name1 = itab-name1.
itab3-ort01 = itab-ort01.
itab3-bldat = itab-bldat.
APPEND itab3.
CLEAR itab3.
ENDON.
ENDLOOP.
jtab-mblnr = itab-mblnr.
jtab-xblnr = itab-xblnr.
jtab-budat = itab-budat.
jtab-bktxt = itab-bktxt.
jtab-lsmng = itab-lsmng.
jtab-erfmg = itab-erfmg.
jtab-erfme = itab-erfme.
jtab-matnr = itab-matnr.
jtab-maktx = itab-maktx.
jtab-zeile = itab-zeile.
APPEND jtab.
LOOP AT itab3.
CLEAR: itab2,itab2[].
LOOP AT itab WHERE mblnr = itab3-mblnr.
MOVE-CORRESPONDING itab TO itab2.
APPEND itab2.
CLEAR itab2.
ENDLOOP.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMM_GOODS_RECEIPT1'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fname
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.
*break developer1.
PERFORM print_parameters.
CALL FUNCTION fname
EXPORTING
control_parameters = ls_control_param
output_options = ls_otpt_opt
user_settings = 'X'
gr_mseg_hdr = itab3
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
gr_mseg = itab2
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.
ENDFORM. " GR_DISPLAY
FORM mat_display .
SELECT mblnr mjahr matnr werks lgort lifnr menge meins
erfmg bpmng ebeln ps_psp_pnr zeile lsmng erfme
mat_pspnr nplnr aufpl aplzl
FROM mseg
INTO CORRESPONDING FIELDS OF TABLE itab
WHERE mblnr IN mat_num.
LOOP AT itab.
SELECT ltxa1 FROM afvc INTO CORRESPONDING FIELDS OF itab1
WHERE aufpl = itab-aufpl AND aplzl = itab-aplzl.
itab-ltxa1 = itab1-ltxa1.
MODIFY itab TRANSPORTING ltxa1.
ENDSELECT.
REFRESH itab1.
SELECT ktext FROM aufk INTO CORRESPONDING FIELDS OF itab1
WHERE aufnr = itab-nplnr.
itab-ktext = itab1-ktext.
MODIFY itab TRANSPORTING ktext.
ENDSELECT.
REFRESH itab1.
SELECT pspnr psphi post1 INTO CORRESPONDING FIELDS OF itab1
FROM prps WHERE pspnr = itab-mat_pspnr.
itab-psphi = itab1-psphi.
itab-pspnr = itab1-pspnr.
itab-post2 = itab1-post1.
MODIFY itab TRANSPORTING psphi pspnr post2.
ENDSELECT.
SELECT post1 FROM proj INTO CORRESPONDING FIELDS OF itab2
WHERE pspnr = itab-psphi.
itab-post1 = itab2-post1.
MODIFY itab TRANSPORTING post1.
ENDSELECT.
REFRESH itab2.
SELECT maktx FROM makt INTO CORRESPONDING FIELDS OF itab2
WHERE matnr = itab-matnr.
itab-maktx = itab2-maktx.
MODIFY itab TRANSPORTING maktx.
ENDSELECT.
REFRESH itab2.
SELECT name1 ort01 FROM lfa1 INTO CORRESPONDING FIELDS OF itab2
WHERE lifnr = itab-lifnr.
itab-name1 = itab2-name1.
itab-ort01 = itab2-ort01.
MODIFY itab TRANSPORTING name1 ort01.
ENDSELECT.
REFRESH itab2.
SELECT budat bldat cpudt xblnr bktxt FROM mkpf
INTO CORRESPONDING FIELDS OF itab2
WHERE mblnr = itab-mblnr.
itab-budat = itab2-budat.
itab-bldat = itab2-bldat.
itab-cpudt = itab2-cpudt.
itab-xblnr = itab2-xblnr.
itab-bktxt = itab2-bktxt.
break developer1.
MODIFY itab TRANSPORTING budat bldat cpudt xblnr bktxt.
ENDSELECT.
ENDLOOP.
LOOP AT itab.
ON CHANGE OF itab-mblnr.
itab3-mblnr = itab-mblnr.
itab3-budat = itab-budat.
itab3-bldat = itab-bldat.
itab3-post1 = itab-post1.
itab3-ktext = itab-ktext.
APPEND itab3.
CLEAR itab3.
ENDON.
ENDLOOP.
LOOP AT itab3.
CLEAR: itab2, itab2[].
LOOP AT itab WHERE mblnr EQ itab3-mblnr.
MOVE-CORRESPONDING itab TO itab2.
APPEND itab2.
CLEAR itab2.
ENDLOOP.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMM_MAT_ISSUE_SLIP'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fname
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_control_param-no_dialog = 'X'.
*ls_control_param-preview = 'X'.
*ls_control_param-getotf = 'X'.
ls_otpt_opt-tdnoprev = 'X'.
ls_otpt_opt-tdnewid = ''.
ls_otpt_opt-tdimmed = 'X'.
ls_otpt_opt-tddest = 'LP01'.
CALL FUNCTION fname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = ls_control_param
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = ls_otpt_opt
user_settings = 'X'
mat_slip_hdr = itab3
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = ls_job_info
JOB_OUTPUT_OPTIONS =
TABLES
mat_slip = itab2
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.
ENDFORM.Hi saswat mohanty ,
Welcome to SDN. Ya your program takes lot of time to give the output becauase of more select endselects in a loop.
You are hitting as many times as the records in the ITAB.
Instead use "for all entries" clause for fetching the complete data from a table atonce.
Example: your itab is there.
Select * from xyz
into table itab2
for all entries in itab
where field1 eq itab-field1
and field2 eq itab-field2.
After fetching the data you can populate the final table by looping through ITAB and itab2.
This is best procedure to reduce the load on database.
Implement this in your program to improve performance.
REWARD POINTS IF USEFUL.
Venkat. -
Smartform of a particular employee with dynamic actions
Hi All,
I am making an HR smartform - pulling data from infotypes - so I am using logical database pnp. Now Everytime I enter the personal number in the PNP screen, it gives me form with correct data of respective employee.
I want to club this smart form's driver program to a dynamic action, so the personal number would ne chosen dynamically. For that I believe we have to choose HR report category from program attributes of driver program as '0000003'.
If I do that and hardcode the employee number it do not takes it but it starts printing smartforms of all the employees - even if I keep the report category as 0000001, it asks for a personal number at runtime,n do not takes hardcoded value - The getpernr statment is not fetching up the data for that particular employee but it pulls data for all employees.
Please suggest how could I use the hard coded value of pernr to get the resp3ective data in the smartform. Do I have to create another report category - a new one? if so how?
If u have any sample code? Please share it.
Thanks
RibhuHi Suresh, I was just testing it by hardcoding, wheather it takes the pernr from places other than input box of the report category. Right.
Below is the code. If you want to know anything else, Please let me know.
Thanks
Ribhu
Here is the code:
REPORT ZHRtest.
tables : q0008, pa0001, pa0000, pa0002, pa0014, pa0021, pa0022, pa0008, pa0006, pernr, t500p,t530, t512t, t510, t526, t529t, t528t,
M_PLOMC, T7INA3, T7INB5, T7INB7, T518B.
infotypes : 0000, 0001, 0002, 0014, 0021, 0022, 0008, 0006, 0105, 9003.
data : E_DATE TYPE SY-DATUM, " Date
E_ORGUNIT TYPE ORGEH, " Organizational Unit
E_PERSNO TYPE P_PERNR, " Personnel Number
DATA : WS_UCOMM LIKE SY-UCOMM.
data: begin of pers_tab occurs 0,
E_SLAB1MIN TYPE PIN_MINBS,
E_SLAB1MAX TYPE PIN_MAXBS,
E_SLAB1INCR TYPE PIN_AMINC,
E_SLAB2MIN TYPE PIN_MINBS,
E_SLAB2MAX TYPE PIN_MAXBS,
E_SLAB2INCR TYPE PIN_AMINC,
end of pers_tab.
DATA: BEGIN OF WAGETYPES,
E_LGA LIKE P0008-LGA01,
E_BET LIKE P0008-BET01,
E_pernr like pernr-pernr,
END OF WAGETYPES.
data : E_lga like pa0008-lga01,
E_bet like pa0008-bet01.
data: count type i.
data : v_year(4) type c,
v_mon(2) type c,
v_date like sy-datum,
v_date1 like sy-datum.
data : v_formname type tdsfname ,
v_fmname type rs38l_fnam.
data: i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
DATA : WAGETYPES1 LIKE BAPIP0008P OCCURS 0 WITH HEADER LINE.
data: begin of temp_tab occurs 0 ,
t_minbs type PIN_MINBS,
t_maxbs type PIN_MAXBS,
t_aminc type PIN_AMINC,
end of temp_tab.
data: hr_pernr like p0000-pernr, " persno of hr emp
plans_hr like p0001-plans . " position text.
constants : c_x type c value 'X', " Sign
c_pernr(8) type n value '00000000', " Pernr
c_val1(2) type c value '31', " Date Type
c_val2(2) type c value '12', " Date Type
c_val like p0041-dar01 value '01', " Date Type
c_1 like pernr-persg value '1', " Emp Group
c_type like hrp1001-otype value ' ', " Object Type
c_date1 like sy-datum value '18000101', " Date
c_date2 like sy-datum value '99991231', " Date
r_all value 'X'.
selection-screen begin of block b2 with frame title text-001.
selection-screen begin of line.
parameter pdf radiobutton group smf.
selection-screen comment 5(20) text-002.
parameter prn radiobutton group smf.
selection-screen comment 40(20) text-003.
selection-screen end of line.
selection-screen skip 3.
selection-screen begin of line.
selection-screen comment 3(30) text-007.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 5(30) text-004.
parameter p1 radiobutton group pg.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 5(30) text-005.
parameter p2 radiobutton group pg.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 5(30) text-006.
parameter p3 radiobutton group pg.
selection-screen end of line.
Selection-screen end of block b2.
ws_ucomm = sy-ucomm.
*CLEAR PERNR.
*CLEAR PNPPERNR.
At selection-screen.
perform validate_screen.
start-of-selection.
perform get_period.
PERNR-PERNR = 27.<b> <<<<< ----- this is where i tried to hard code</b>
PNPPERNR-LOW = 27.
get pernr .
LOOP AT PERNR.
*IF PNPPERNR-LOW NE PERNR-PERNR.
*CLEAR PERNR.
*ELSE. EXIT.
*ENDIF.
*ENDLOOP.
**PNPPERNR-HIGH = ''.
E_PERSNO = PNPPERNR-LOW.
rp_provide_from_last p0000 space pnpbegda pnpendda.
rp_provide_from_last p0002 space pnpbegda pnpendda .
rp_provide_from_last p0021 space pnpbegda pnpendda.
rp_provide_from_last p0022 space pnpbegda pnpendda.
rp_provide_from_last p9003 space pnpbegda pnpendda.
describe table p0008 lines count.
describe table p0001 lines count.
PERFORM FORM_SELECTION changing P1 P2 P3."<----
To get the fathers name.
select FAVOR FANAM from pa0021 into corresponding fields of p0021 where pernr = E_PERSNO and FAMSA = '11'.
if sy-subrc = 0.
E_FIRSTNAME = P0021-FAVOR.
E_LASTNAME = P0021-FANAM.
endif.
endselect.
FORM validate_screen .
CLEAR PERNR. <b><<<<< ----- this is where i tried to hard code</b>
PERNR-PERNR = '00000027'.
PNPPERNR = '00000027'.
**PNPPERNR-HIGH = ''.
E_PERSNO = pnppernr-low.
p9003-pernr = 27.
*E_PERSNO = p9003-pernr.
pnppernr-low = E_PERSNO.
clear sy-index.
loop at pnppernr.
endloop.
if sy-index GT 1.
message 'Enter only one personal number' type 'E'.
endif.
if pnppernr-low is initial.
PNPPERNR-LOW = '27'.
message 'enter a personal number' type 'E'.
endif.
ENDFORM. " validate_screen -
Smartforms and its internal table
Hi All!
From the main program, I call the FM SSF_FUNCTION_MODULE_NAME
and later "call lf_fm_name" as below shown.
The generated FM name gets an "internal table" in the tables parameter.
And now how can I to treat now this internal table within smart forms?
Please can you sequential explain the treatment. How can I acces
these datas of this internal table in the smartforms
reagards
ilhan
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lv_pick_formname
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = lf_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
IF sy-subrc = 1.
MESSAGE e061.
ELSEIF sy-subrc = 2.
MESSAGE e062.
ELSEIF sy-subrc = 3.
MESSAGE e063.
ENDIF.
ENDIF.
CALL FUNCTION lf_fm_name
TABLES lt_ausgabe_data = lt_ausgabe_datawhat ever you pass from program to smartforms you need to declare in
GLOBAL INTERFACE -> Import parameter.(in the driver program export parameter). make sure u use the same name in the SMARTFORM GLOBAL INTERFACE - > import parameter.
for more about smartforms go thru these link
for Smartforms material
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
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Please check the tables TNAPR and TTXFP for Standard Smartforms.
See the note 595812: it explain how to download the preconfigured smartforms.
Detailed information can be accessed at the site:
http://service.sap.com/preconfiguredforms OR
http://service.sap.com/smb/development/preconfiguredforms.
To download preconfigured smartform package, please:
1. Go to http://service.sap.com/installations, select tab "download".
2. On the right hand side screen, locate navigation tree node
SAP Software Distribution Center->Download->Installations and Upgrades->
Entry by Application Group.
3. In the main window (right hand side), follow the path
SAP Best Practices->Best Practices for mySAP All-in-One-> PRECONFIGURED
SMART FORMS, you can find available preconfigured smartform versions.
regards,
Prabhu
reward if it is helpful -
How to print the barcode in a smartform satisfying specific condition
Hi
I have a requirement where I need to print the barcode System Bar code = BC_93
satisfying the following requirement:
The Bar code is made up of the concatenation of code1 , dash character
and code2. The two codes ( that is some field in a custom table) should be
eight char long each (put leading zero if the length of the code is shorter).
This barcode shall be printed always apart from:
a) code1 material type is ZCPF
b )Is a combi order, with no code2 stored in storage location abc
please help with example . its very urgent , points will be rewarded.
ThanksTo 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
go through these links and cose u r previous threads,
http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
smartform - barcode
http://www.erpgenie.com/abap/smartforms.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-basis/print-barcode-with-smartform-634396
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/printing-barcode-733550
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.
Re: how to print barcode using smartform and sapscript...? -
Smartform prints out Black boxes instead of Shade
Hello Experts,
I have developed some smartforms which have some boxes that are shaded with grey color for heading.
They work fine for some existing printers. But when i issue a print out on a new printer i
see that the shaded boxes are displayed as solid black boxes on the print out.
I also tried to print it in color but invain. Even the LOGO also got blacked out.
Can any one suggest me what to do.
Is it with my smartform or printer settings. Please advice.
Thanks
DanyHi
I don't know if u can't find out a solution.
All device output (printers) having the same divice type have the same behavior, i.e. printers having a different device type can give a different output, so if u'll correct the problem for a certain group of printers u could have a new problem for other group.
I think the best soltion is to use the printer used to test the smartforms
Max -
Smartform in Purchase Order ME21N
Hi guys.
I'm working in SAP 6.0 ECC. I am developing a sapscript for purchase order and it is working well, but i wanna do the same in smartform, i checked on the web that sap 6.0 ecc has some standard smartform for Purchase Order, but mine doesnt have it. In addition, i tried to convert my sapscript to smartform, but the only thing that converts are the windows, no tables or variables, so it doesnt work.
how can i do it? somebody did a smartform for ME21N??? what are the parameters that i need to use? the idea is that this smartform will be trigged at the moment of release the purchase order throught ME29N.
Regards
it will be super usefull that somebody could send me a smartformSending attachments by mail is not really compliant with forum rules (because other people won't get the information).
The good answer would have been to look at SDN "smart forms" home page, then look at section "preconfigured smart forms".
It says that it must be downloaded from SWDC (SAP software download center), choose Installations and Upgrades -> ...Entry by Application Group -> SAP Best Practices -> SAP BP BASELINE PACKAGE ...
Maybe you are looking for
-
RowSet Column Type Mismatch Error
Hi, I am using SOA 11g, JDeveloper 11.1.1.3.0 BPEL, SOA 11g, DB2 Stored procedure, In a BPEL service I am getting this error while invoking a DB2 Stored procedure with Strong XSD. while running I am getting this error message. This error message whil
-
Having trouble displaying a JPanel on a JFrame
Hello all, I'm fairly new to Java and I am having trouble displaying a JPanel on a JFrame. Pretty much I have a class called Task which has a JPanel object. Everytime the user creates a new task, a JPanel with the required information is created on s
-
MY MYSPACE HOME PAGE AND INBOX PAGE IS NOT SHOWING FULL PAGE...ALL GONE TO THE CENTER == URL of affected sites == http:// www.myspace.com/orangebyrd
-
Hello Expert, I want to know, how we can request the needed instillation number for "BA&T SAP BObj BI, Edge edit." in steps. because i'm enter to the link http://service.sap.com/inst-data https://websmp108.sap-ag.de/contracts but i don't kno
-
Movies in iTunes to be viewed via Apple TV
I have currently 29 movies in iTunes with a total length of 10 hours and wanted to add another one. But it will not let me add a new one but replace another film. Is there a limit of how many films I can have in iTunes? I have plenty of room on the s