Coding in smartforms
Suppose I'm doing the coding in smartforms, then how to make a selection screen.Please explain with a sample code.
you must create a common report program to do the select-screen
then at last to call the smartform and importing parameter
call function 'SSF_FUNCTION_MODULE_NAME'
exporting formname = lf_formname 'your smartforms name
variant = ' '
direct_call = ' '
importing fm_name = lf_fm_name
exceptions no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
error handling
cf_retcode = sy-subrc.
perform protocol_update.
endif.
endif.
call smartform invoice
call function lf_fm_name
exporting
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_appl_obj =
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = 'X'
is_bil_invoice = ls_bil_invoice
is_vbdkr = vbdkr
is_komk = komk
is_catsxt_data = i_catsxt_flow_back
importing document_output_info =
job_output_info =
job_output_options =
tables is_vbdpr = t_vbdpr
is_komv = tkomv
is_komvd = tkomvd
exceptions formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc <> 0.
error handling
cf_retcode = sy-subrc.
perform protocol_update.
endif.
Similar Messages
-
Coding in Smartform inside a Text Box
Hi All,
Whether this code is correct inside a text box in a Smartform ?
:/ IF &GS_NAME1& <> ''.
<T2>&GS_NAME1&</>
ENDIF.
:/ IF &GS_NAME2& <> ''.
<T2>&GS_NAME2&</>
:/ ENDIF.
Thanks in Advance ,
Vivek K ..You cannot use IF statements inside the smartforms text nodes.
In you case, you need to create two text nodes.
one to print <T2>&GS_NAME1&</>, in the condition tabs update the condition with field name GS_NAME1 and select <> option on Operartor column and value as Inital for the comparison.
Second to print <T2>&GS_NAME2&</>, in the condition tabs update the condition with field name GS_NAME2 and select <> option on Operartor column and value as Inital for the comparison. -
Dunning - Entire Coding in SMARTFORMS!!
Hi,
I need to develop one Dunning Program through Smartforms, generate a PDF and Mail the same.
I have few questions regarding the same.
u2022 Which Application do I need to choose in NACE as I see nothing related to Dunning?
u2022 If there is no Application then the question of Output type is ruled out. That means Driver Program is also ruled out.
u2022 If I need to code everything in Smartform itself I mean, PDF and E-Mailing .How can I achieve this.
Thanks in Advance for your help.Hi Ullas,
For NACE on dunning,
Go to transaction NACE
2. Select EF application, click on output types
3. Select Output type NEU and double click on processing routines
4. Here you can give ur driver program name and script name
Check the link
about dunning form
hope this helps.
Regards,
SuryaD.
Edited by: SuryaD on Dec 18, 2009 10:56 PM
Edited by: SuryaD on Dec 18, 2009 10:57 PM -
Regarding Selection Screen in smartforms
Hi:
I got the following requirement.
I've to make a smartform & do the coding in smartform itself. I'm not sure that how to populate a selection screen. I need to populate a Select-options. Please help me out.HI,
You can create the Selection screen in a program and call the Smartform function module in the Program and you can pass the Selection screen parameters to the Smartfor, if you create the Fields in FROM INTERFACE in Smartfroms, then that become import paramters in the function module and you can pass the selection screen fields to this paramters
Look at the below link, it is having the Program and the Progam using the select-options also
http://www.erpgenie.com/abap/smartforms.htm
Regards
Sudheer -
Create Postscript with extra comment lines
Hi all,
Hope anyone can help me out on this subject.
Our customer sent's its formatted invoices to a partner firm that prints them. The partner needs to receive postscript files with some lines of comment at the top. These comments are command instruction on how to print and handle the invoice. I.e. paper type, folding, priority etc.
<b>Any ideas on how to get specific comment lines in the postscript file?</b>
My own idea is to add comments to the OTF, but I don't know if they will be transferred to the postscript file.
Btw I would rather add the comments within the smartform.
Additional info:
- SAP R/3 Enterprise (6.20)
- The invoices are printed through a Z-program, which is an adjusted copy of RLB_INVOICE.
- The invoice is formatted using a smartform
Thanks,
Hans van der KooijIf your postscript comments going to be constant or have few variations then using HEX ENDHEX migth help
Post script comment begin with %, it's hex value is 25, convert all characters after % to hex, for Ex: if your comment is %ABC, it's hex equivalent is 25414243
add the following lines to a standerd text in SO10:
/: HEX TYPE POST
/* following line is hex equivalent of %ABC,
/ 25414243
/: ENDHEX
Include the standard text into ur smartform header window.
The comment lines appear after about 200 lines in the postscript file.
If you need to add comment lines after first line of the postscript file, best way is to modify the postscript file using a unix script before sending it to the partner. u don't need to do any coding in smartform if u choose to use unix script.
Regards
Sridhar -
Hello Experts,
We are trying to print barcodes via sapscript. We have a DIMM card on our HP printer. We are able to print the barcode on the form using sapscript, but it will not scan.
We were able to generate a barcode using a form coded in Smartforms and it scans, but the SAPscript version does not scan. We would rather not recode our form in Smartforms, since we really just want to add a barcode to it.
Any ideas would be appreciated!
DebbieHi Deborah,
Please check the link below for solution:
Barcode Scanning/reading
Also, there are many threads related to Barcode printing and scanning on the forum. You can search for it.
Please share your solution with us.
Regards,
Saba -
How to replace the standard smartform layout coding to its original content
Hi All,
I have edited a standard layout and coding in a standard smartform.
And i had been made some changes in it but now i need to give the older one(which should be same when i got it - no changes should be made).
How and where can i do changes to submit the older program???Hello Rajesh,
specifiy the path in PCD location in SPRO (IMG)>> homepage framework where there payslip is store.
let me know if you still face problem.
rewards point if helpful.
thanksyou,
Regards
Vijai -
Coding Initialization on smartforms
IF i wnat to write the coding in the initialiazation part of my developed smartform......what are the stpes for the coding?
Edited by: Alvaro Tejada Galindo on Apr 21, 2008 3:39 PMHi,
For that u have to pass the Input and Output Parameters which are declared in global definations.
Lets Take an Example:
In Input Parameters -->GV_KUNNR1
Output Parameter-->GV_NAME
Write the code in Initialization
PERFORM GET_INVOICE_CUSTOMER_NAME USING GV_KUNNR1 CHANGING GV_NAME.
In Form Routine Write
* Form GET_INVOICE_CUSTOMER_NAME
* Populate The Invoice Customer Name
* --> pr_kunnr Incoming parameter
* <--pr_v_name Outgoing Parameter
FORM get_invoice_customer_name USING pr_kunnr TYPE kunnr
CHANGING pr_v_name TYPE ad_name1.
SELECT SINGLE
name1
FROM adrc
INTO pr_v_name
WHERE addrnumber = pr_kunnr.
ENDFORM. "GET_INVOICE_CUSTOMER_NAME
Regards
Sandipan -
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 -
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 -
How to set border lines in table and also in template in the smartforms ?
How to set border lines in table and also in template in the smartforms ?
As I have to create table with following detals
total row = 3
row1 = 3 column
row2 = 6 column
row3 = 9 column
for 2nd and 3rd row data to be fetched using coding.
so can anybody explain me what should i use
Table or Template ?
and I want the border like excel format.
Can anybody suggest me ?
Thanks
nareshif the data is multiple i.e. line items choose table.
if the data is single i.e. fixed choose template.
Create table
> Draw u r no lines
> choose option select pattern
> select display framed patterns
Choose u r required one.
out lined, or full lined. u can choose option.
same procedure to be followed for template also.
with regards,
Kiran.G -
How to print the texts retrived by using READ_TEXT fun module in Smartform
Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
I have coded all things in the program lines and in that i am retriveing the long texts.
I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text.
I have to print the trouble ticket. in that the notes log I have to pass.
its urgent. Points will be rewarded for any type of clue. whether it will work or not.There are a few ways to do it. If you need to take all of the text in the text type, in your SF text element choose "Include Text".
Populate the fields with the data that corresponds to the text type. It is similar to the interface to the FM "Read_Text.
Text Name
Text Obje
Text ID
Language
Encase any variables with the "&" symbol.
If you have already coded the call to the FM "READ_TEXT" and loaded the text into an internal table, create a loop and loop through the itab. Inside of the loop create a text element and add a variable in the text element for the field you are looking to output. -
How to Print two pages in smartforms
Hi All,
How to create two different pages in smartforms.In my requirement the first page contains Table data in main window and in second page only the hard coded desription should be printed containg instructions,but the second page is mandatory after first
page is completed,the first page may have n number of pages after printing those pages my second page should trigger.Help me if any one knows.
Thanks in advance............
Regards,
Satya.hi ,
once a main window size is declared , then that space will be placed in each page created.
eg. if a table with header and footer is created, first of all the space for header and footer are allocated and body page is allocated.
so we cannot dynamically change the size of the main window , even it is a copied main window.
Otherwise another option is to continue the main window into the second page.
for that first page main window -> create table -> add page break command to page 2 -> hard code description in template.
page attribute for first page --> GOTO assign same page ( for continuing the same page)
Page attribute for second page --> no need default is enough -
How to hide a window in smartforms
Hi experts,
How to hide a window in smartforms depends on the conditions. The condition is the window how a hard coded values + fields. if the condition satisfies i want to display in form if its fails no need to display in the form... plz, its urgent.
Regards.
Gowrisankarhi,
inside the window, you can create a condition.
right click on the window, CREATE>FLOWLOGIC>ALTERNATIVE.
you can give your condition there
thx
pavan -
How to print text rertrived by using the READ_TEXT fun module in smartform
Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
I have coded all things in the program lines and in that i am retriveing the long texts.
I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text module.
its urgent. Points will be rewarded for any type of clue. whether it will work or not.loop the table into which u have retrieved the text .
in the form interface of the smartform ... in importing parameter give the that table name .
and in smartform whereever u want to print there insert the data into work area and pass to fields for dispaly .
decalre ur work area in global defintions
thnaks .
Maybe you are looking for
-
Free goods determination & Free of charge Delivery
Hello Gurus, Actually I have couple of queries regarding free goods. 1) Can we manitain free goods for BOM Business Scenario - I have created a BOM "ABC" at Main item level (ERLA) with components B, C and want to give 2 different Items X, Y as free
-
Major problem saving and printing documents on two computers
This is a bizarre problem that seems to have been transferred from my old MDD to my new Mini when I migrated all my old data and it has me baffled. My apologies if this explanation seems long and complicated but I want to be pretty thorough. About a
-
Dear gurus, I have configured OID 10.1.4.0.1 and MRCA 10.1.4.0.1 on database 10.2.0.3 with Oracle Application Server 10.1.3.3 (HTTP Server and OC4J Server). it went well, i could login into my oid or sso page. then i deployed a simple jar file into O
-
How to limit the number of instances of an MDB?
Hi, I am using jboss 4.0.5 AS, and we have an mdb which listens to the jboss's jms queue. We are using ejb 3. we are configuring MDB like this @MessageDriven(name="LongProcessMessageBean", activationConfig = { @ActivationConfigProperty(propertyName="
-
Bug in Pro*C on Linux!
When I have installed Oracle8i Release 8.1.5.0.1 on Linux(kernel is 2.2.10). I use Pro*C/C++: Release 8.1.5.0.0 to precompile the programme list below. I run this programme to connect to Oracle8 Enterprise Edition Release 8.0.4.0.0 installed on Digit