Function help_start
I have create a documentation for my program. Furthermore I have create a button on the dynpro where I execute the dunction help_start. But when I look to the window which will be open after the click on the button I only see an empty window for the documentation only with the title.
How can I add the documentation of the program to the function?
I use following coding:
WHEN 'INFO'.
DATA: ls_help_info LIKE help_info,
lt_dselc LIKE dselc OCCURS 0,
lt_dval LIKE dval OCCURS 0.
ls_help_info-call = 'D'.
ls_help_info-object = 'N'.
ls_help_info-spras = sy-langu.
ls_help_info-docuid = 'RE'.
ls_help_info-report = text-001.
CALL FUNCTION 'HELP_START'
EXPORTING
help_infos = ls_help_info
TABLES
dynpselect = lt_dselc
dynpvaluetab = lt_dval
EXCEPTIONS
OTHERS = 1.
ENDCASE.
Hi,
Check this Fm
CALL FUNCTION 'DSYS_SHOW_FOR_F1HELP'
EXPORTING
DOKCLASS = 'RE'
DOKNAME = <Reportname>
SHORT_TEXT = 'X'
EXCEPTIONS
OTHERS = 1.
Similar Messages
-
FUNCTION MODULE HELP_START
Hello friends I am using this function module HELP_START
I am gettin the pop-up scrren showin in the matnr but wen i double click on it the value is not goin inside the select option.
Below is the code of my program
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS s_vbeln FOR vbak-vbeln.
SELECT-OPTIONS s_matnr FOR mara-matnr. " MATCHCODE OBJECT mat1.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_matnr-low.
IF NOT s_vbeln IS INITIAL.
REFRESH t_select.
CLEAR t_select.
SELECT matnr FROM vbap INTO CORRESPONDING FIELDS OF TABLE t_select
WHERE vbeln IN s_vbeln
AND matnr IN s_matnr.
IF sy-subrc <> 0.
MESSAGE i036(zcvs).
ENDIF.
LOOP AT t_select.
SELECT SINGLE xchpf FROM mara INTO (wa_mara-xchpf)
WHERE matnr = t_select-matnr
AND xchpf = 'X'.
IF sy-subrc = 0.
t_select-xchpf = wa_mara-xchpf.
MODIFY t_select.
ENDIF.
ENDLOOP.
DELETE t_select WHERE xchpf NE 'X'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'MATNR'
PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_MATNR'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = t_select
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 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.
ELSE.
*if s_vbeln is initial.
DATA: help_infos TYPE help_info.
DATA: dynpselect TYPE TABLE OF dselc.
DATA: dynpvaluetab TYPE TABLE OF dval.
CLEAR help_infos.
help_infos-call = 'T'.
help_infos-object = 'F'.
help_infos-spras = sy-langu.
help_infos-docuid = 'FE'.
help_infos-title = sy-title.
help_infos-tabname = 'MARA'.
help_infos-fieldname = 'MATNR'.
help_infos-keyword = 'X'.
help_infos-program = sy-repid.
help_infos-dynpro = sy-dynnr.
help_infos-report = sy-repid.
help_infos-dynpprog = sy-repid.
help_infos-dynprofld = 'S_MATNR-LOW'.
CALL FUNCTION 'HELP_START'
EXPORTING
help_infos = help_infos
TABLES
dynpselect = dynpselect
dynpvaluetab = dynpvaluetab.
ENDIF.try this
TABLES: vbak,
mara.
DATA: t_select TYPE STANDARD TABLE OF mara,
wa_select TYPE mara,
wa_mara TYPE mara.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS s_vbeln FOR vbak-vbeln.
SELECT-OPTIONS s_matnr FOR mara-matnr. " MATCHCODE OBJECT mat1.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_matnr-low.
IF NOT s_vbeln IS INITIAL.
REFRESH t_select.
CLEAR t_select.
SELECT matnr FROM vbap INTO CORRESPONDING FIELDS OF TABLE t_select
WHERE vbeln IN s_vbeln
AND matnr IN s_matnr.
IF sy-subrc <> 0.
MESSAGE i036(zcvs).
ENDIF.
LOOP AT t_select
INTO wa_select.
SELECT SINGLE xchpf FROM mara INTO wa_mara-xchpf
WHERE matnr = wa_select-matnr
AND xchpf = 'X'.
IF sy-subrc = 0.
wa_select-xchpf = wa_mara-xchpf.
MODIFY t_select FROM wa_select.
ENDIF.
ENDLOOP. -
HELP_START: how can i do a search help F4 same as field Group PLNNR in CA02
Hi all,
I'm developing a report in which i use two field Group (PLNNR) and Group counter (PLNAL) as same as in CA02: choose a group by F4 and after these two fields are filled with the chosen values in help screen.
My problem: i would like to do a search help for field Group (PLNNR) as same as in CA02. I have used the Function HELP_START for this purpose, but i can not reach my purpose: i choose a group in dialog help and after the field Group have the chosen value, but the field Group counter (PLNAL) don't have any value.
I don't know which input values for structure HELP_INFOS will be get a result as same as in CA02?
Anyone know how i should do to solve my problem, please help me?
Which input is incorrect (code below), please help me!
Thanks a lot in advance,
My Actual input for structure HELP_INFOS as below:
ls_help-call = 'V'.
ls_help-tabname = 'RC271'.
ls_help-fieldname = 'PLNNR'.
ls_help-spras = sy-langu.
ls_help-docuid = 'FE'.
ls_help-object = 'F'.
ls_help-dynpprog = sy-repid.
ls_help-report = sy-repid.
ls_help-dynpro = sy-dynnr.
ls_help-pfkey = 'NXD'.
ls_help-dynprofld = 'P_PLNNR'. (My fiel 'Group' in Selection screen)
ls_help-MENUFUNCT = 'HC'.
ls_help-fieldlng = '8'.
ls_help-pov = 'N'.
ls_help-curow = sy-cucol.
ls_help-cucol = sy-curow.
ls_help-selectart = 'A'.
CALL FUNCTION 'HELP_START'
EXPORTING
help_infos = ls_help
IMPORTING
select_value = lv_select_value
TABLES
dynpselect = wt_dselc
dynpvaluetab = wt_dval.
Thanks,
Vinh VoWhy do it in more complicated way, while the simplest method is available. You can use :
PARAMETERS: p_plnnr LIKE rc271-plnnr.
PARAMETERS: p_plnal LIKE rc271-plnal.
Give it a try.
Thanks & regards,
Hadiman -
Dear All!
This Report DEMO_DYNPRO_F4_HELP_DYNPRO
is calling "HELP_START" if you press F4.
My question is where exactly is the call ?
I cant find it ?
rgds
ertasDisplay help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
CALL FUNCTION 'HELP_START'
EXPORTING
HELP_INFOS = LSTR_HELP_INFO
IMPORTING
SELECTION = LC_SELECTION
SELECT_VALUE = LC_SELECTION_VALUE
TABLES
DYNPSELECT = FTAB_DYNPSELECT
DYNPVALUETAB = FTAB_DYNPVALUETAB
EXCEPTIONS
OTHERS = 1.
IF LC_SELECTION NE SPACE AND SY-SUBRC = 0.
F_NEWVALUE = LC_SELECTION_VALUE.
ENDIF.
check this [link|http://abap4.tripod.com/How_to_Create_Popup_Help.html] -
hi all,
i am getting a flat file from application server .i have to do some validations and i am passing these values to bapi structure to create Purchase requisition(PR).but it is not creating any PR.
i am sending my code to u pls go through that .and tell me where i have to change it
report zlpr_inb_str_create
no standard page heading
line-size 250
message-id zl_msg.
TYPES DECLARATION *
types:begin of ty_data,
sc_code type t001l-lgort, "School Code
course type ltext, "Course
stock_item type matnr, "Stocked Item Number
quantity type char5, "Requisition Quantity
ac_info type char20, "Accounting Information
fincode type bp_geber, "Fund
fkber type fkber , "Functional Area
kostl type kostl , "Cost Center
saknr type saknr , "G/L Account Number
gsber type gsber , "Business Area
end of ty_data.
types:begin of ty_log ,
sc_code type t001l-lgort, "School Code
course type ltext, "Course
stock_item type matnr, "Stocked Item Number
quantity type char5, "Requisition Quantity
ac_info type char20, "Accounting Information
s_date type sy-datum, "System Date
s_time type sy-uzeit, "System Time
err_msg type char100, "Error Message
end of ty_log.
types:begin of ty_mara,
matnr type mara-matnr, "Material code
ac_info(20) type c,
end of ty_mara.
types:begin of ty_lgort,
lgort type t001l-lgort, "Storage Location
ac_info(20) type c,
end of ty_lgort.
types:begin of ty_fincode,
fincode type fmfincode-fincode, "SAP Fund
end of ty_fincode .
types:begin of ty_fkber,
fkber type tfkb-fkber, "SAP Function Area
end of ty_fkber .
types:begin of ty_kostl,
kostl type csks-kostl, "SAP Cost Center
end of ty_kostl .
types:begin of ty_saknr,
saknr type ska1-saknr, "SAP GL Account
end of ty_saknr .
types:begin of ty_gsber,
gsber type tgsb-gsber, "SAP Business Area
end of ty_gsber .
VARIABLES DECLARATION *
data: g_fincode type bp_geber, "Fund
g_fkber type fkber , "Functional Area
g_kostl type kostl , "Cost Center
g_saknr type saknr , "G/L Account Number
g_gsber type gsber , "Business Area
g_itmcnt type i , "Count for item lines
g_err type c . "For error messages
INTERNAL TABLES DECLARATION *
data:it_data type standard table of ty_data with header line,
it_dynsel type table of dselc with header line,
it_dynval type table of dval,
it_log type standard table of ty_log, "Error log
it_mara type standard table of ty_mara, "Material Number
it_lgort type standard table of ty_lgort, "Storage Location
it_fincode type standard table of ty_fincode, "Fund
it_fkber type standard table of ty_fkber, "Functional Area
it_kostl type standard table of ty_kostl, "Cost Center
it_saknr type standard table of ty_saknr, "G/L Account Number
it_gsber type standard table of ty_gsber. "Bussiness Area
WORK AREA DECLARATION *
data: wa_data type ty_data,
wa_string type string,
wa_log type ty_log, "Error Log
wa_mara type ty_mara, "Material Number
wa_lgort type ty_lgort, "Storage Location
wa_fincode type ty_fincode, "Fund
wa_fkber type ty_fkber, "Functional Area
wa_kostl type ty_kostl, "Cost Center
wa_saknr type ty_saknr, "G/L Account Number
wa_gsber type ty_gsber, "Bussiness Area
wa_helpinf type help_info.
INTERNAL TABLES DECLARATION FOR PASSING VALUES IN BAPI *
data : it_item type standard table of bapiebanc, "Item Data
it_atasg type standard table of bapiebkn, "Account Assignment Data for Item
it_ittxt type standard table of bapiebantx, "Text for Item
it_return type standard table of bapireturn, "Return Messages
g_reqstno type bapiebanc-preq_no. "Purchase Requisition Number
data : wa_bapiebanc type bapiebanc,
wa_bapiebkn type bapiebkn ,
wa_bapiebantx type bapiebantx,
wa_return type bapireturn.
CONSTANTS *
constants: c_program type ztcca_pgmconst value 'ZLPR_INB_STR_CREATE', "program Name
c_field1 type ztcca_pgmconst value 'Z_STR_CREATE',
c_msg type char41 value 'No Valid Records to Process in the file',
c_module type char2 value 'PR',
c_dev_type type zcca_dev_type value 'INT',
c_movement type zcca_movement value 'I',
c_object_id type char25 value 'PR_INB_0001',
c_dlmtr type c value '|', "For Deliminator
c_fldname(10) type c value 'FILEINTERN', "For File name FM
c_dyflname(19) type c value 'FILENAME-FILEINTERN', "For File name FM
c_fname(8) type c value 'FILENAME', "For file name FM
c_prog(8) type c value 'RSSYSTDB', "For file name FM
c_chktable(10) type c value 'FILENAMECI', "For file name FM
c_dynpro(4) type c value '1000', "For File name FM
c_dynprofld(6) type c value 'P_FILE', "For File name FM
c_call(1) type c value 'T', "For File name FM
c_spras type c value 'E', "For File name FM
c_obj(1) type c value 'F', "For File name FM
c_pov(1) type c value 'N', "For File name FM
c_currow(1) type c value '3', "For File name FM
c_curcol(2) type c value '35', "For File name FM
c_sydyn(1) type c value 'S', "For File name FM
c_pr_type(4) type c value 'ZUB', "For PR Type
c_item_cat(1) type c value 'U', "For Item Category
c_ac_asign(1) type c value 'K', "For Cost Center
c_pur_grp(1) type c value 'H', "For Purchasing Group
c_pur_org(4) type c value 'DCPS', "For Purchasing Organisation
c_gl_ac(4) type c value 'CABE',
c_unit(2) type c value 'EA', "For Unit Of Measure
c_r_plant(4) type c value '1000' , "For Requesting Plant
c_10(2) type c value '10',
c_3000(4) type c value '3000', "For Supplying Plant
c_90(2) type c value '90',
c_ok(1) type c value 'X',
c_i(1) type c value 'I',
c_eq(2) type c value 'EQ',
c_flag(1) type c value 'X' ,
c_x(1) type c value 'X' ,
c_coma(1) type c value ',' ,
c_00(2) type c value '00' ,
c_0000(4) type c value '0000' ,
c_one type i value 1 ,
c_98 type i value 98 .
AT SELECTION-SCREEN *
*-- selection screen declarations
selection-screen begin of block b_source with frame title text-008.
parameters: p_file type localfile . "Source file name
parameters:rb_phy radiobutton group path user-command ucmd default 'X', "Physical path
rb_logic radiobutton group path . "Logical path
selection-screen end of block b_source.
AT SELECTION-SCREEN ON VALUE-REQUEST *
at selection-screen on value-request for p_file.
*--Get the value help for the application server .
perform get_value_help.
AT SELECTION-SCREEN ON INPUT FILE *
at selection-screen on p_file.
*--Validate the physical file path of application server
perform validate_file_path using p_file.
START-OF-SELECTION EVENT *
start-of-selection.
*--To get source file data from application server
perform get_file_data.
*-- Validate input file data
perform validate_data.
*-- Post STR / PR in SAP
perform create_str.
*--To display the processing log
PERFORM display_log.
*--- Display Default Application server file path on selection screen
perform default_app_server_file.
*& Form VALIDATE_FILE_PATH
Validate physical file path for application server
form validate_file_path using p_app_file.
data: l_app_fname type sldstring, "APPLICATION FILE NAME
l_test type sldagtst. "TEST INDICATOR
move p_app_file to l_app_fname.
if rb_phy = 'X'.
if p_file ne space.
*CHECK WHETHER FILE EXIST IN THE APPLICATION SERVER
call function 'SLDAG_CHECK_FILE_EXISTENCE'
exporting
fq_file_name = l_app_fname
importing
exists = l_test.
if l_test is initial.
message i023. "File not found.
endif.
endif.
endif.
clear l_test.
endform. " VALIDATE_FILE_PATH
*& Form GET_VALUE_HELP
Get the help for the file name
form get_value_help .
if rb_phy = 'X'.
call function '/SAPDMC/LSM_F4_SERVER_FILE'
exporting
directory = '.'
importing
serverfile = p_file
exceptions
canceled_by_user = 1
others = 2.
if sy-subrc <> 0.
message i023. "File not found
endif.
elseif rb_logic = c_ok.
clear: wa_helpinf,
it_dynsel,
it_dynval.
refresh: it_dynsel,
it_dynval.
Set the parameters before invoking the FM
for browsing the logical filename
wa_helpinf-call = c_call.
wa_helpinf-object = c_obj.
wa_helpinf-program = c_prog.
wa_helpinf-dynpro = c_dynpro.
wa_helpinf-tabname = c_fname.
wa_helpinf-fieldname = c_fldname.
wa_helpinf-spras = sy-langu.
wa_helpinf-title = sy-title.
wa_helpinf-dynprofld = c_dynprofld.
wa_helpinf-checktable = c_chktable.
wa_helpinf-checkfield = c_fldname.
wa_helpinf-report = sy-cprog.
wa_helpinf-pov = c_pov.
wa_helpinf-curow = c_currow.
wa_helpinf-cucol = c_curcol.
wa_helpinf-sy_dyn = c_sydyn.
wa_helpinf-dynpprog = sy-cprog.
it_dynsel-fldname = c_fldname.
it_dynsel-dyfldname = c_dyflname.
append it_dynsel.
Call the FM to display the help for the logical filenames
call function 'HELP_START'
exporting
help_infos = wa_helpinf
tables
dynpselect = it_dynsel
dynpvaluetab = it_dynval.
endif.
endform. " GET_VALUE_HELP
*& Form get_file_data
text
form get_file_data .
*--Open the file and move data into table it_data
open dataset p_file for input in text mode encoding default.
if ( sy-subrc ne 0 ).
message e002 with c_msg.
endif.
while sy-subrc = 0.
read dataset p_file into wa_string.
if sy-subrc = 0.
split the string into table structure
split wa_string at '|' into: wa_data-sc_code "School Code
wa_data-course "Course
wa_data-stock_item "Stock Item Number
wa_data-quantity "Quantity
wa_data-ac_info. "Accounting Information
Convert Stock Item number ( Material number )
call function 'CONVERSION_EXIT_MATN1_INPUT'
exporting
input = wa_data-stock_item "Stock Item Number
importing
output = wa_data-stock_item "Stock Item Number
exceptions
length_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Get SAP fields from accounting information string
wa_data-gsber = wa_data-ac_info+12(4). " validate to sap bussiness area
concatenate wa_data-ac_info+1(3) c_00 into wa_data-fincode. "validate to Sap fund
concatenate wa_data-ac_info4(4) c_00 wa_data-ac_info8(4) c_0000
into wa_data-fkber. "Validate Functional Area
concatenate wa_data-ac_info+12(4) c_00 into wa_data-kostl. "Validate Cost Center
concatenate wa_data-ac_info+16(4) c_00 into wa_data-saknr. "validate to Sap GL Account
*-- Convert Cost center into internal format
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = wa_data-kostl
importing
output = wa_data-kostl.
*-- Convert G/L Account into internal format
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = wa_data-saknr
importing
output = wa_data-saknr.
append wa_data to it_data.
endif.
endwhile.
close dataset p_file.
if ( sy-subrc ne 0 ).
message e005.
endif.
sort it_data ascending by sc_code .
endform. " GET_FILE_DATA
*& Form validate_data *
text *
form validate_data .
*-- If input file contains data, create STR in SAP
if ( it_data[] is initial ).
Error message
message e002.
endif.
Extract material data for validation
select matnr "Material Number
from mara
into table it_mara
for all entries in it_data
where matnr = it_data-stock_item.
Extract Storage location data for validation
select lgort "Storage Location
from t001l
into table it_lgort
for all entries in it_data
where werks = c_3000 and
lgort = it_data-sc_code.
Extract SAP Fund IDs
select fincode "Fund
from fmfincode
into table it_fincode
for all entries in it_data
where fikrs = c_pur_org
and fincode = it_data-fincode.
Extract SAP Function Area
select fkber "Functional Area
from tfkb
into table it_fkber
for all entries in it_data
where fkber = it_data-fkber.
Extract SAP Cost Center
select kostl "Cost Center
from csks
into table it_kostl
for all entries in it_data
where kokrs = c_pur_org
and kostl = it_data-kostl
and datbi >= sy-datum
and datab <= sy-datum.
Extract SAP G/L Account
select saknr "G/L Account Number
from ska1
into table it_saknr
for all entries in it_data
where ktopl = c_gl_ac
and saknr = it_data-saknr.
Extract SAP Business Area
select gsber "Bussiness Area
from tgsb
into table it_gsber
for all entries in it_data
where gsber = it_data-gsber.
Validate uploaded material and storage location data
sort it_mara by matnr. "Material Number
sort it_lgort by lgort. "Storage Location
sort it_fincode by fincode. "Fund
sort it_fkber by fkber. "Functional Area
sort it_kostl by kostl. "Cost Center
sort it_saknr by saknr. "G/L Account Number
sort it_gsber by gsber. "Bussiness Area
loop at it_data into wa_data.
Validate Material number
read table it_mara into wa_mara with key matnr = wa_data-stock_item
binary search.
if sy-subrc ne 0.
perform update_error_log using wa_data
text-001.
endif.
Validate Storage location ( School Code )
read table it_lgort into wa_lgort with key lgort = wa_data-sc_code.
if sy-subrc ne 0.
perform update_error_log using wa_data
text-002.
endif.
Validate Sap fund
read table it_fincode into wa_fincode with key fincode = it_data-fincode
binary search.
if sy-subrc ne 0.
perform update_error_log using wa_data
text-003.
endif.
Validate Functional Area
read table it_fkber into wa_fkber with key fkber = it_data-fkber
binary search.
if sy-subrc ne 0.
perform update_error_log using wa_data
text-004.
endif.
Validate Cost Center
read table it_kostl into wa_kostl with key kostl = it_data-kostl
binary search.
if sy-subrc ne 0.
perform update_error_log using wa_data
text-005.
endif.
Validate G/L Account Number
read table it_saknr into wa_saknr with key saknr = it_data-saknr
binary search.
if sy-subrc ne 0.
perform update_error_log using wa_data
text-006.
endif.
Validate to Bussiness Area
read table it_gsber into wa_gsber with key gsber = it_data-gsber
binary search.
if sy-subrc ne 0.
perform update_error_log using wa_data
text-007.
endif.
endloop.
endform. " VALIDATE_DATA
*& Form REQUISITION_CREATE
text
--> p1 text
<-- p2 text
form requisition_create .
if c_flag ne c_x.
call function 'BAPI_REQUISITION_CREATE'
exporting
SKIP_ITEMS_WITH_ERROR =
automatic_source = c_x
importing
number = g_reqstno
tables
requisition_items = it_item
requisition_account_assignment = it_atasg
requisition_item_text = it_ittxt
REQUISITION_LIMITS =
REQUISITION_CONTRACT_LIMITS =
REQUISITION_SERVICES =
REQUISITION_SRV_ACCASS_VALUES =
return = it_return.
REQUISITION_SERVICES_TEXT =
REQUISITION_ADDRDELIVERY =
EXTENSIONIN =
if g_reqstno is not initial.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = c_x
IMPORTING
RETURN =
endif.
read table it_return into wa_return with key type = 'E'.
if sy-subrc eq 0.
write: / wa_return-message.
else.
write: / g_reqstno.
endif.
endif.
endform. " REQUISITION_CREATE
*& Form display_log
text
WRITE: text-011,p_file.
LOOP AT it_log INTO wa_log.
WRITE : / wa_log-sc_code, wa_log-stock_item, wa_log-quantity, sy-datum, sy-uzeit, wa_log-err_msg.
ENDLOOP.
*ENDFORM. " DISPLAY_LOG
*& Form UPDATE_ERROR_LOG
text
-->P_WA_DATA text
-->P_TEXT_001 text
To display Error Message
form update_error_log using p_data type ty_data
p_errmsg.
clear : wa_log.
*CONCATENATE wa_log-sc_code wa_log-course wa_log-stock_item wa_log-quantity wa_log-ac_info into g_err SEPARATED BY c_coma.
wa_log-sc_code = p_data-sc_code. "School Code
wa_log-course = p_data-course. "Course
wa_log-stock_item = p_data-stock_item. "Stock Item Number
wa_log-quantity = p_data-quantity. "Quantity
wa_log-ac_info = p_data-ac_info. "Account Information
wa_log-err_msg = p_errmsg. "Error Message
concatenate wa_log-sc_code wa_log-course wa_log-stock_item wa_log-quantity
wa_log-ac_info into g_err separated by c_coma.
append wa_log to it_log.
endform. " UPDATE_ERROR_LOG
*& Form CREATE_STR
text
--> p1 text
<-- p2 text
form create_str .
sort it_data by sc_code.
loop at it_data into wa_data.
clear : wa_bapiebanc, wa_bapiebkn, wa_bapiebantx.
at new sc_code.
refresh : it_item,it_atasg,it_ittxt.
clear : g_itmcnt.
endat.
*-- Count of Item lines per school code
g_itmcnt = g_itmcnt + c_one.
wa_bapiebanc-doc_type = c_pr_type. "purchase requisition documentation type
wa_bapiebanc-item_cat = c_item_cat. "ITEM CATEGORY
wa_bapiebanc-acctasscat = c_ac_asign. "Account Assignment Category
wa_bapiebanc-material = wa_data-stock_item. "Material number
wa_bapiebanc-suppl_plnt = c_3000. "supplying plant
wa_bapiebanc-pur_group = c_pur_grp. "purchase Group
wa_bapiebanc-purch_org = c_pur_org. "Purchase Organisation
wa_bapiebanc-unit = c_unit. "Unit of measure
wa_bapiebanc-plant = c_r_plant. "receiving plant
wa_bapiebanc-deliv_date = sy-datum + 7. "Delivary date
append wa_bapiebanc to it_item.
wa_bapiebkn-fund = it_data-fincode. "SAP Fund
wa_bapiebkn-func_area = it_data-fkber. "Functional Area
wa_bapiebkn-bus_area = it_data-gsber . "Business Area
wa_bapiebkn-cost_ctr = it_data-kostl. "Cost Center
wa_bapiebkn-g_l_acct = it_data-saknr . "G/L Account
append wa_bapiebkn to it_atasg .
wa_bapiebantx-text_line = wa_data-course.
append wa_bapiebantx to it_ittxt.
*-- If item line count per school code is 98, call BAPI to create STR/PR
if ( g_itmcnt = c_98 ).
perform requisition_create.
refresh : it_item,it_atasg,it_ittxt.
clear : g_itmcnt.
continue.
endif.
*-- At end of school code, call BAPI to create STR/PR
at end of sc_code.
perform requisition_create.
endat.
endloop.
endform. " CREATE_STR
*& Form DEFAULT_APP_SERVER_FILE
text
--> p1 text
<-- p2 text
form default_app_server_file .
call function 'ZCCA_DEFAULT_APP_SERVER_FILE'
exporting
module = c_module
dev_type = c_dev_type
movement = c_movement
object_id = c_object_id
FILE_EXTENSION = 'TXT'
importing
serverfile = p_file .
concatenate p_file c_object_id '_' sy-datum sy-uzeit into
p_file.
endform. " DEFAULT_APP_SERVER_FILEwa_bapiebanc-doc_type = c_pr_type. "purchase requisition documentation type
wa_bapiebanc-item_cat = c_item_cat. "ITEM CATEGORY
wa_bapiebanc-acctasscat = c_ac_asign. "Account Assignment Category
wa_bapiebanc-material = wa_data-stock_item. "Material number
wa_bapiebanc-suppl_plnt = c_3000. "supplying plant
wa_bapiebanc-pur_group = c_pur_grp. "purchase Group
wa_bapiebanc-purch_org = c_pur_org. "Purchase Organisation
wa_bapiebanc-unit = c_unit. "Unit of measure
wa_bapiebanc-plant = c_r_plant. "receiving plant
wa_bapiebanc-deliv_date = sy-datum + 7. "Delivary date
***************************************************8
here pass wa_bapiebanc-CREATE_IND= '1'.
append wa_bapiebanc to it_item.
note
Short Text
Creation Indicator (Purchase Requisition/Schedule Lines)
Definition
Shows whether the purchase requisition or delivery schedule line was
created manually or automatically (e.g. as a result of the requirements
planning process).
In the case of delivery schedules created under scheduling agreements,
if schedule lines with different creation indicators are consolidated to
form a release schedule line, the creation indicator remains "blank". -
Select field 'B' based on field 'A'
Hi,
I have a report with selection screen. I want to display the list of possible entries for field 'B' as per the value in field 'A'.
I am doing this on event
<b>"Selection screen on value-request for <B></b>
using functional module
<b>'REUSE_ALV_POPUP_TO_SELECT'</b>
Everything is fine except one problem.
Let's take a example that screen has two fields
A).
<b>parsmeters: p_vbeln like vbap-vbeln.</b>
"Sales order number
B).
<b>parameters: p_posnr like vbap-posnr.</b>
"line item
Based on sales order number i have to show an popup with corresponding line item numbers. and i have coded this under,
<b>Selection screen on value-request for POSNR</b>
<u><b>Scenario 1:</b></u> i enter the sales order number in the field p_vbeln <b>and hit enter</b>
when i do F4 on p_posnr, it displays the popup with corresponding line items.
<b>This works fine</b>
<u><b>Scenario 2:</b></u> i just type in the sales order number and <b>do not hit enter or anything)</b>
Now if i do F4 on p_posnr, it doesn't display the line items, since there is not value populated in p_vbeln as entered it but did not press enter.
I hope i am making sense.
So, my problem is how display possible value for field 'B' if user type in the value in field 'A' but do not hit enter.
Please let me know.
Thanks,
Pal*-- F4 help for Payroll Administrator
AT SELECTION SCREEN ON VALUE REQUEST FOR P_SACHA.
PERFORM VALUES_SACHA.
*-- F4 help for Pay Scale Group
AT SELECTION SCREEN ON VALUE REQUEST FOR P_TRFGR.
*-- F4 help for Pay Scale Level
AT SELECTION SCREEN ON VALUE REQUEST FOR P_TRFST.
FORM VALUES_SACHA
Provide popup help for the Payroll Admin field
FORM VALUES_SACHA.
REFRESH: LTAB_DYNPSELECT,
LTAB_DYNPVALUETAB.
PERFORM READ_VALUE_FROM_SCREEN USING SY-REPID
SY-DYNNR
'PA0001-WERKS'
CHANGING LTAB_DYNPSELECT-FLDNAME
LTAB_DYNPSELECT-FLDINH.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'MANDT'.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'SACHX'.
APPEND LTAB_DYNPSELECT.
PERFORM SHOW_HELP TABLES LTAB_DYNPSELECT
LTAB_DYNPVALUETAB
USING 'T526'
'SACHX'
CHANGING PA0001-SACHA.
ENDFORM. " VALUES_SACHA
FORM VALUES_TRFGR
Provide popup help for Pay Scale Group
FORM VALUES_TRFGR.
REFRESH: LTAB_DYNPSELECT,
LTAB_DYNPVALUETAB.
LTAB_DYNPSELECT-FLDNAME = 'MANDT'.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'MOLGA'.
SELECT SINGLE MOLGA FROM T001P
INTO LTAB_DYNPSELECT-FLDINH
WHERE WERKS = *PA0001-WERKS
AND BTRTL = *PA0001-BTRTL.
IF SY-SUBRC NE 0.
LTAB_DYNPSELECT-FLDINH = SPACE.
ENDIF.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'TRFAR'.
LTAB_DYNPSELECT-FLDINH = *PA0008-TRFAR.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'TRFGB'.
LTAB_DYNPSELECT-FLDINH = *PA0008-TRFGB.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'TRFKZ'.
SELECT SINGLE TRFKZ FROM T503
INTO LTAB_DYNPSELECT-FLDINH
WHERE PERSG = *PA0001-PERSG
AND PERSK = *PA0001-PERSK.
IF SY-SUBRC NE 0.
LTAB_DYNPSELECT-FLDINH = SPACE.
ENDIF.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'TRFGR'.
LTAB_DYNPSELECT-FLDINH = SPACE.
APPEND LTAB_DYNPSELECT.
PERFORM SHOW_HELP TABLES LTAB_DYNPSELECT
LTAB_DYNPVALUETAB
USING 'T510'
'TRFGR'
CHANGING PA0008-TRFGR.
PERFORM UPDATE_VALUE_ON_SCREEN USING SY-REPID
SY-DYNNR
'PA0008-TRFGR'
PA0008-TRFGR.
ENDFORM. " VALUES_TRFGR
FORM VALUES_TRFST
Provide popup help for Pay Scale Area
FORM VALUES_TRFST.
REFRESH: LTAB_DYNPSELECT,
LTAB_DYNPVALUETAB.
LTAB_DYNPSELECT-FLDNAME = 'MANDT'.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'MOLGA'.
SELECT SINGLE MOLGA FROM T001P
INTO LTAB_DYNPSELECT-FLDINH
WHERE WERKS = *PA0001-WERKS
AND BTRTL = *PA0001-BTRTL.
IF SY-SUBRC NE 0.
LTAB_DYNPSELECT-FLDINH = SPACE.
ENDIF.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'TRFAR'.
LTAB_DYNPSELECT-FLDINH = *PA0008-TRFAR.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'TRFGB'.
LTAB_DYNPSELECT-FLDINH = *PA0008-TRFGB.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'TRFKZ'.
SELECT SINGLE TRFKZ FROM T503
INTO LTAB_DYNPSELECT-FLDINH
WHERE PERSG = *PA0001-PERSG
AND PERSK = *PA0001-PERSK.
IF SY-SUBRC NE 0.
LTAB_DYNPSELECT-FLDINH = SPACE.
ENDIF.
APPEND LTAB_DYNPSELECT.
PERFORM READ_VALUE_FROM_SCREEN USING SY-REPID
SY-DYNNR
'PA0008-TRFGR'
CHANGING LTAB_DYNPSELECT-FLDNAME
LTAB_DYNPSELECT-FLDINH.
APPEND LTAB_DYNPSELECT.
LTAB_DYNPSELECT-FLDNAME = 'TRFST'.
LTAB_DYNPSELECT-FLDINH = SPACE.
APPEND LTAB_DYNPSELECT.
PERFORM SHOW_HELP TABLES LTAB_DYNPSELECT
LTAB_DYNPVALUETAB
USING 'T510'
'TRFST'
CHANGING PA0008-TRFST.
PERFORM UPDATE_VALUE_ON_SCREEN USING SY-REPID
SY-DYNNR
'PA0008-TRFST'
PA0008-TRFST.
ENDFORM. " VALUES_TRFST
FORM SHOW_HELP *
--> FTAB_DYNPSELECT *
--> FTAB_DYNPVALUETAB *
--> FSTR_HELP_INFO *
--> F_NEWVALUE *
FORM SHOW_HELP TABLES FTAB_DYNPSELECT STRUCTURE DSELC
FTAB_DYNPVALUETAB STRUCTURE DVAL
USING F_CHECKTABLE LIKE HELP_INFO-CHECKTABLE
F_CHECKFIELD LIKE HELP_INFO-CHECKFIELD
CHANGING F_NEWVALUE.
DATA: LSTR_HELP_INFO LIKE HELP_INFO.
DATA: LC_SELECTION_VALUE LIKE HELP_INFO-FLDVALUE.
DATA: LC_SELECTION(1) TYPE C.
*-- Fill in fields required for help function call
LSTR_HELP_INFO-CALL = 'T'.
LSTR_HELP_INFO-OBJECT = 'F'.
LSTR_HELP_INFO-SPRAS = SY-LANGU.
LSTR_HELP_INFO-CHECKTABLE = F_CHECKTABLE.
LSTR_HELP_INFO-CHECKFIELD = F_CHECKFIELD.
CALL FUNCTION 'HELP_START'
EXPORTING
HELP_INFOS = LSTR_HELP_INFO
IMPORTING
SELECTION = LC_SELECTION
SELECT_VALUE = LC_SELECTION_VALUE
TABLES
DYNPSELECT = FTAB_DYNPSELECT
DYNPVALUETAB = FTAB_DYNPVALUETAB
EXCEPTIONS
OTHERS = 1.
IF LC_SELECTION NE SPACE AND SY-SUBRC = 0.
F_NEWVALUE = LC_SELECTION_VALUE.
ENDIF.
ENDFORM. " SHOW_HELP
FORM READ_VALUE_FROM_SCREEN *
--> F_REPID *
--> F_DYNNR *
--> VALUE(F_FIELDNAME_IN) *
--> F_FIELDNAME_OUT *
--> F_FIELDVALUE *
FORM READ_VALUE_FROM_SCREEN USING F_REPID
F_DYNNR
VALUE(F_FIELDNAME_IN)
CHANGING F_FIELDNAME_OUT
F_FIELDVALUE.
DATA: LTAB_FIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE.
DATA: LC_DYNAME LIKE SY-REPID.
DATA: LC_DYNUMB LIKE SY-DYNNR.
DATA: LC_DUMMY(1) TYPE C.
*-- Read the screen to see if the user has entered a value for WERKS
LTAB_FIELDS-FIELDNAME = F_FIELDNAME_IN.
append ltab_fields.
LC_DYNAME = F_REPID.
LC_DYNUMB = F_DYNNR.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = LC_DYNAME
DYNUMB = LC_DYNUMB
TABLES
dynpfields = ltab_fields
EXCEPTIONS
OTHERS = 01.
read table ltab_fields index 1.
*-- Return the value from the screen
IF SY-SUBRC EQ 0.
SPLIT LTAB_FIELDS-FIELDNAME AT '-'
INTO LC_DUMMY
F_FIELDNAME_OUT.
F_FIELDVALUE = LTAB_FIELDS-FIELDVALUE.
ENDIF.
ENDFORM. " READ_VALUE_FROM_SCREEN
FORM UPDATE_VALUE_ON_SCREEN *
The PROCESS ON VALUE-REQUEST does not always return blanks. *
If a blank value is to be returned, this routine must be *
called.
--> F_REPID *
--> F_DYNNR *
--> VALUE(F_FIELDNAME) *
--> F_FIELDVALUE *
FORM UPDATE_VALUE_ON_SCREEN USING F_REPID F_DYNNR VALUE(F_FIELDNAME) F_FIELDVALUE.
DATA: LTAB_FIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE.
DATA: LC_DYNAME LIKE SY-REPID.
DATA: LC_DYNUMB LIKE SY-DYNNR.
LC_DYNAME = SY-REPID.
LC_DYNUMB = SY-DYNNR.
LTAB_FIELDS-FIELDNAME = F_FIELDNAME.
LTAB_FIELDS-FIELDVALUE = F_FIELDVALUE.
APPEND LTAB_FIELDS.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING DYNAME = LC_DYNAME
DYNUMB = LC_DYNUMB
TABLES DYNPFIELDS = LTAB_FIELDS
EXCEPTIONS OTHERS = 8.
ENDFORM. " UPDATE_VALUE_ON_SCREEN
regards
vinod -
Search help for field in Standard Transaction
Hi Experts,
We have a requirement to have an F4 search help for a standard field .
( Plant, werks, Tx AS01 ). This field is not associated with any standard search help, but it throws F4 values programmatically .
We need to associate a standard search help ( BETR_BUKRS ) with this Plant field.
1. How to proceed abt it ( As it is a part of module program , can we straight away associate with the search help in the property ) ,it is a field of standard Transaction .
2. If we include search help above, what will happen to the already existing F4 functionality ? Can we have both in tabs ?
Thanks a lot,
~Abap LoverHi Seshatal,
Thanks for the input, but this field does NOT have any ON VALUE REQUEST event associated with it ....
as soon as F4 is hit, it goes to Function help_start ,so I don't think we can make any changes here as it is standard .
I think including a standard search help will help....how to achieve this ?
Thanks, -
Search Help - Restricting entries in standard search helps
Hi, is there any way to restrict entries in an SAP supplied search help? The search help in question is 'SSH_T007A', this search help also has a user exit 'F4_TAXCODE_USER_EXIT'. I'm not sure if the user exit is of any use or how to use it. Ideally what I need to do is to restrict the list of applicable tax codes to only those that we want our users to select. Does anyone have an idea of how to do this with a minimum of customization?
Thanks in advance,
Kevin MayHi Seshatal,
Thanks for the input, but this field does NOT have any ON VALUE REQUEST event associated with it ....
as soon as F4 is hit, it goes to Function help_start ,so I don't think we can make any changes here as it is standard .
I think including a standard search help will help....how to achieve this ?
Thanks, -
Create popup - Makes user to enter a valid date
I need to create a popup menu and I must make the user enters a valid date in order to continue processing.
Thanks In-advance!
JeffGuse FM 'HELP_START' to display calender popup, with this use will always enter a valid date and in right user format.. see below example
REPORT zpwtest.
DATA : i_sel TYPE TABLE OF dselc ,
i_value TYPE TABLE OF dval .
DATA : w_help TYPE help_info .
DATA : value TYPE help_info-fldvalue .
PARAMETERS p_dat TYPE char10 .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dat .
w_help-call = 'T' .
w_help-tabname = 'SYST' .
w_help-fieldname = 'DATUM' .
w_help-spras = sy-langu .
w_help-dynprofld = 'P_DAT' .
w_help-report = sy-repid .
w_help-dynpprog = sy-repid .
CALL FUNCTION 'HELP_START'
EXPORTING
help_infos = w_help
IMPORTING
select_value = value
TABLES
dynpselect = i_sel
dynpvaluetab = i_value.
p_dat = value . -
Restrict F4 (Search Button) of ship to party in Delivery
Hi,
At present if the users press the F4 button in ship to party, it is shown to customers list.
My requirement is, Display customers list in Delivery transactions (VL01N,VL02N,VL03N) by pressing F4 in ship to party, system should not show the list.
We are using the ECC 5.
How to restrict the F4 (Search button) of ship to party in delivery?
Regards,
DevendraHai Devendrap,
In case your requirement is, user should not enter data in he ship to party then make then greyed out using SHDO screen variant transaction.
Since you mentioned VL03N also user should not check list of customers.
Ask you abaper, to check the Main program
Program (screen) SAPMV50A
SAPLSHL2 / LSHL2U01
FUNCTION / HELP_START
write a code before
if sy_tcode ne 'vl01n or vl02n or vl03n
then use
Alle F4-Hilfe Aufrufe werden hier abgehandelt
All F4 Call helps
if help_infos-call = 'T' or "Alle Arten von Prüftabellen
help_infos-call = 'M' or "Matchcode-Hilfe
help_infos-call = 'V'. "Festwerte (Domäne oder VALUES)
"+ alle anderen
endif
So other t codes f 4 help wlil come and these three it will not come.
Regards,
Mani -
Hi Guys,
FYI, im having a table control with field Plant and Material. I have defaulted the <b>std search help</b> to field <u>Material</u> at the screen painter. Meaning system will call up the search help for Material once i press F4.
Since the search help for field Material is a collective search help, and there is a <u>Plant</u> field available for Material filtering. Thus i may need to get the Plant's value from of same row of the table control to Populate into the Material's search help.
I have already tried to create a new module under the LOOP...ENDLOOP at PAI's flow logic. And try to use parameter id to set the value for plant, purpose is to populate it to Material's search help when i click F4 on material field. The problem is the new module that i coded under LOOP...ENDLOOP will never trigger when i click F4. Because there is NO event to trigger my module.
Other than the above, i tried to code it under POV. But it doesn't work as well, because there is more than 1 record under table control and i can not determine the during runtime which row of F4 for material being click.
Please comment on this above on how to solve the problem.
Thanks in advance.Hi,
You can call standard collective search help [say for Eg:<b>MAT1</b>] through Process on value-request event and set the paramenter id of Plant field before calling the funtion module <b>'HELP_START'</b>.Then we can get the materials specific to the PLANT in the corresponding row of the TABLE CONTROL.
To get which row of the table control is clicked use <b>Get Cursor Line</b> Statement as i mentioned below.
Flow logic:
PROCESS ON VALUE-REQUEST.
FIELD x_marc-matnr MODULE mat_shelp.
Module definition:
MODULE mat_shelp INPUT.
DATA:v_help_info LIKE help_info,n TYPE i,
it_dyselect LIKE TABLE OF dselc WITH HEADER LINE,
it_dyvaltab LIKE TABLE OF dval WITH HEADER LINE.
REFRESH it_dyselect.
it_dyselect-fldname = 'MANDT'.
it_dyselect-dyfldname = 'SY-MANDT'.
APPEND it_dyselect.
it_dyselect-fldname = 'MATNR'.
it_dyselect-dyfldname = 'X_MARC-MATNR'.
APPEND it_dyselect.
v_help_info-call = 'M'.
v_help_info-object = 'F'.
v_help_info-program = sy-repid. "'ZVIG_MOD_TABLE_CONTROL_1'.
v_help_info-dynpro = sy-dynnr. "'9001'.
v_help_info-tabname = 'MARC'.
v_help_info-fieldname = 'MATNR'.
v_help_info-fieldtype = 'CHAR'.
v_help_info-keyword = 'MATNR'.
v_help_info-fieldlng = 18.
v_help_info-fldvalue = ''.
v_help_info-mcobj = 'MAT1'.
v_help_info-spras = 'E'.
v_help_info-menufunct = 'HC'.
v_help_info-title = 'SAP'.
v_help_info-dynprofld = 'X_MARC-MATNR'. <b>----
> Give ur screen field name</b>
v_help_info-tcode = sy-tcode. "'ZTC1'.
v_help_info-pfkey = 'MEN'.
v_help_info-docuid = 'FE'.
v_help_info-pov = 'N'.
v_help_info-curow = '2'.
v_help_info-cucol = '1'.
v_help_info-dynpprog = sy-repid. " ZVIG_MOD_TABLE_CONTROL_1
v_help_info-stepl = '1'.
v_help_info-selectart = 'A'.
GET CURSOR LINE n.
READ TABLE it_marc INTO x_marc INDEX n.
SET PARAMETER ID 'WRK' FIELD X_MARC-WERKS .
CALL FUNCTION 'HELP_START'
EXPORTING
help_infos = v_help_info
TABLES
dynpselect = it_dyselect
dynpvaluetab = it_dyvaltab .
ENDMODULE. " mat_shelp INPUT -
Function module for calculating sigma balance
Is there any function module available in SAP for calculating sigma balance.
Thanks
Gauravhi
ABAP_DOCU_DOWNLOAD Download ABAP documentation in HTML format.
APPL_LOG_DELETE With this function module you delete logs in the database according to specified selection conditions
APPL_LOG_DISPLAY With this function module you can analyze logs in the database.
APPL_LOG_DISPLAY_INTERN With this function module you can analyze logs in local memory, e.g. when you have only collected log records at runtime and do not want to write to the database.
APPL_LOG_INIT This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
APPL_LOG_READ_DB With this function module you read the log data in the database for an object or sub-object according to specified selection conditions.
APPL_LOG_READ_INTERN With this function module you read all log data whose log class has at least the specified value, from local memory, for the specified object or sub-object.
APPL_LOG_SET_OBJECT With this function module, you create a new object or sub-object for writing in local memory. With a flag you can control whether the APPL_LOG_WRITE_... messages are written in local memory or are output on the screen.
APPL_LOG_WRITE_DB With this function module you write all data for the specified object or sub-object in local memory to the database. If the log for the object or sub-object in question is new, the log number is returned to the calling program.
APPL_LOG_WRITE_HEADER With this function module, you write the log header data in local memory.
APPL_LOG_WRITE_LOG_PARAMETERS With this function module, you write the name of the log parameters and the associated values for the specified object or sub-object in local memory. If this function module is called repeatedly for the same object or sub-object, the existing parameters are updated accordingly. If you do not specify an object or sub-object with the call, the most recently used is assumed.
APPL_LOG_WRITE_MESSAGE_PARAMS With this function module you write a single message, with parameters, in local memory. Otherwise the function module works like APPL_LOG_WRITE_SINGLE_MESSAGE.
APPL_LOG_WRITE_MESSAGES With this function module you write one or more messages, without parameters, in local memory.
APPL_LOG_WRITE_SINGLE_MESSAGE With this function module you write a single message, without parameters, in local memory. If no header entry has yet been written for the object or sub-object, it is created. If you do not specify an object or sub-object with the call, the most recently used is assumed.
ARFC_GET_TID will return the IP address of the terminal in hex.
BAL_CNTL_CREATE Create Control for log display
BAL_CNTL_FREE Release Control
BAL_CNTL_REFRESH Put new data in log display
BAL_DB_DELETE Delete logs from the database
BAL_DB_DEQUEUE Unlock log
BAL_DB_ENQUEUE Lock log
BAL_DB_LOAD Load logs from the database
BAL_DB_LOAD Load log(s)
BAL_DB_SAVE Save logs in the database
BAL_DB_SAVE Save log(s)
BAL_DB_SAVE_PREPARE Prepare save
BAL_DB_SEARCH Find logs in the database
BAL_DSP_LOG_DISPLAY Display messages in memory
BAL_DSP_LOG_DISPLAY Display Log
BAL_DSP_LOG_PARAMETERS Either output extended long text or call a callback routine (based on the data in BAL_S_LOG-PARAMS)
BAL_DSP_LOG_TECHNICAL_DATA Output all log header data
BAL_DSP_MSG_LONGTEXT Display message long text
BAL_DSP_MSG_PARAMETERS Either output extended long text or call a callback routine (based on the data in BAL_S_MSG-PARAMS)
BAL_DSP_MSG_TECHNICAL_DATA Output technical data of a message such as work area, error number, etc.
BAL_DSP_OUTPUT_FREE End output
BAL_DSP_OUTPUT_INIT Initialize output
BAL_DSP_OUTPUT_SET_DATA Set dataset to be displayed
BAL_DSP_PROFILE_DETLEVEL_GET Message hierarchy in DETLEVEL
BAL_DSP_PROFILE_NO_TREE_GET Display without tree (fullscreen)
BAL_DSP_PROFILE_POPUP_GET Display without tree (popup)
BAL_DSP_PROFILE_SINGLE_LOG_GET Standard profile (SLG1) for one log
BAL_DSP_PROFILE_STANDARD_GET Standard profile (SLG1) for a lot of logs
BAL_GLB_AUTHORIZATION_GET Assign authorization
BAL_GLB_AUTHORIZATION_RESET Reset authorization
BAL_GLB_CONFIG_GET Read configuration
BAL_GLB_CONFIG_SET Set configuration
BAL_GLB_MEMORY_EXPORT Put function group memory in ABAP-MEMORY
BAL_GLB_MEMORY_IMPORT Get function group memory from ABAP-MEMORY
BAL_GLB_MEMORY_REFRESH (Partially) reset global memory
BAL_GLB_MEMORY_REFRESH (Partially) initialize memory
BAL_GLB_MSG_CURRENT_HANDLE_GET Get current message handle
BAL_GLB_MSG_DEFAULTS_GET Get message defaults
BAL_GLB_SEARCH_LOG Find logs in memory
BAL_GLB_SEARCH_MSG Find messages in memory
BAL_LOG_CREATE Create log with header data
BAL_LOG_CREATE Create log with header data
BAL_LOG_DELETE Delete log (from database also at Save)
BAL_LOG_EXIST Check existence of a log in memory
BAL_LOG_HDR_CHANGE Change log header
BAL_LOG_HDR_CHECK Check log header data for consistency
BAL_LOG_HDR_READ Read log header and other data
BAL_LOG_MSG_ADD Put message in log
BAL_LOG_MSG_ADD Put message in log
BAL_LOG_MSG_CHANGE Change message
BAL_LOG_MSG_CHANGE Change message
BAL_LOG_MSG_CHECK Check message data for consistency
BAL_LOG_MSG_CUMULATE Add message cumulated
BAL_LOG_MSG_DELETE Delete message
BAL_LOG_MSG_DELETE Delete message
BAL_LOG_MSG_EXIST Check existence of a message in memory
BAL_LOG_MSG_READ Read message and other data
BAL_LOG_MSG_REPLACE Replace last message
BAL_LOG_REFRESH Delete log from memory
BAL_LOG_REFRESH Delete log from memory
BAL_MSG_DISPLAY_ABAP Output message as ABAP-MESSAGE
BAL_OBJECT_SELECT Read Application Log objects table record
BAL_OBJECT_SUBOBJECT Check whether object and subobject exist and the combination is allowed
BAL_SUBOBJECT_SELECT Read subobject table record
BP_EVENT_RAISE Trigger an event from ABAP/4 program
BP_JOBLOG_READ Fetch job log executions
CHANGEDOCUMENT_READ_HEADERS Get the change document header for a sales document, and put the results in an internal table.
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CHANGEDOCUMENT_READ_POSITIONS Get the details of a change document, and store them in an internal table. This will tell you whether a field was changed, deleted, or updated.
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CLAF_CLASSIFICATION_OF_OBJECTS Return all of the characteristics for a material
CLOI_PUT_SIGN_IN_FRONT Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.
CLPB_EXPORT Export a text table to the clipboard (on presentation server)
CLPB_IMPORT Import a Text Table from the Clipboard (on presentation server)
COMMIT_TEXT To load long text into SAP
CONVERSION_EXIT_ALPHA_INPUT converts any number into a string fill with zeroes, with the number at the extreme right
Example:
input = 123
output = 0000000000000...000000000000123
CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a simple integer
Example:
input = 00000000000123
output = 123
CONVERT_ABAPSPOOLJOB_2_PDF convert abap spool output to PDF
CONVERT_OTF Convert SAP documents (SAPScript) to other types.
Example:
CALL FUNCTION "CONVERT_OTF"
EXPORTING FORMAT = "PDF"
IMPORTING BIN_FILESIZE = FILE_LEN
TABLES OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
CONVERT_OTFSPOOLJOB_2_PDF converts a OTF spool to PDF (i.e. Sapscript document)
CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.
CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency
DATE_CHECK_PLAUSIBILITY Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
DATE_GET_WEEK will return the week that a date is in.
DATE_IN_FUTURE Calculate a date N days in the future.
DAY_ATTRIBUTES_GET
Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuedsay), whether the day is a holiday, and more.(provided by Francois Henrotte)
DOWNLOAD download a file to the presentation server (PC)
DYNP_VALUES_READ Read the values from a dynpro. This function can be used to read the values from a report's selection screen too (Another example).
DYNP_VALUES_UPDATE Similar to DYNP_VALUES_READ, this function will allow the updating of fields on a dynpro. Very useful when you want to change a field based on the value entered for another field.
ENQUE_SLEEP Wait a specified period of time before continuing processing.
ENQUEUE_ESFUNCTION Lock an abap program so that it cannot be executed.
Example:
Set the parameters as follows:
RELID = 'ZZ'
SRTF2 = 0
SRTF = (your report name)
Please note that you should not use SY-REPID to pass your report name to the function. The value of SY-REPID will change as it is being passed to the function module, and will no longer hold the value of the calling report.
EPS_GET_DIRECTORY_LISTING return a list of filenames from a local or network drive
EPS_GET_FILE_ATTRIBUTES Pass in a filename and a path, and will return attributes for the file
F4_DATE displays a calendar in a popup window and allows user to choose a date, or it can be displayed read only.
F4_IF_FIELD_VALUE_REQUEST Use values from a DDIC table to provide a list of possible values. TABNAME and FIELDNAME are required fields, and when MULTIPLE_CHOICE is selected, more than one value can be returned.
F4IF_INT_TABLE_VALUE_REQUEST F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.
Example:
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
o_begru-low = t_return-fieldval.
if o_begru-low = 'PAR*'.
o_begru-option = 'CP'.
else.
o_begru-option = 'EQ'.
endif.
o_begru-sign = 'I'.
append o_begru to s_begru.
else.
o_begru = i_begru.
endif.
F4IF_SHLP_EXIT_EXAMPLE documents the different reasons to use a search help exit, and shows how it is done.
F4IP_INT_TABLE_VALUE_REQUEST This function does not exist in 4.6 and above. Use F4IF_INT_TABLE_VALUE_REQUEST instead.
FILENAME_GET popup to get a filename from a user, returns blank filename if user selects cancel
FORMAT_MESSAGE Takes a message id and number, and puts it into a variable. Works better than WRITE_MESSAGE, since some messages use $ as a place holder, and WRITE_MESSAGE does not accommadate that, it only replaces the ampersands (&) in the message.
FTP_COMMAND Execute a command on the FTP server
FTP_CONNECT Open a connection (and log in) to an FTP server
FTP_DISCONNECT Close the connection (and log off) the FTP server
FU CSAP_MAT_BOM_READ You can use this function module to display simple material BOMs. You cannot display BOM groups (for example, all variants of a variant BOM). as in transaction CS03. Current restrictions: You cannot display long texts. You cannot display sub-items. You cannot display classification data of BOM items for batches. You can only display one alternative or variant. You cannot enter an alternative for module CSAP_MAT_BOM_READ, so you always see alternative 01. The following example came from a posting on the SAP-R3-L mailing list.
Example:
data: begin of tstk2 occurs 0.
include structure stko_api02.
data: end of tstk2.
data: begin of tstp2 occurs 0.
include structure stpo_api02.
data: end of tstp2.
data: begin of tdep_data occurs 0.
include structure csdep_data.
data: end of tdep_data.
data: begin of tdep_descr occurs 0.
include structure csdep_descr.
data: end of tdep_descr.
data: begin of tdep_source occurs 0.
include structure csdep_source.
data: end of tdep_source.
data: begin of tdep_order occurs 0.
include structure csdep_order.
data: end of tdep_order.
data: begin of tdep_doc occurs 0.
include structure csdep_doc.
data: end of tdep_doc.
data: flg_warning like capiflag-flwarning.
call function 'CSAP_MAT_BOM_READ'
exporting
material = 'MAT100'
plant = '0001'
bom_usage = '1'
valid_from = '20.12.1996'
valid_to
importing
fl_warning = flg_warning
tables
t_stko = tstk2
t_stpo = tstp2
t_dep_data = tdep_data
t_dep_descr = tdep_descr
t_dep_source = tdep_source
t_dep_order = tdep_order
t_dep_doc = tdep_doc
exceptions
error = 1.
Function Group GRAP is now obsolete. SAP recommends using functions in function group SFES instead. Below is an overview of the changes.
G_SET_GET_ALL_VALUES Fetch values from a set.
GET_CURRENT_YEAR Get the current fiscal year.
Example:
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = '1000' " Company Code
DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
CURRM = w_currm " Current Fiscal Month
CURRY = w_curry " Current Fiscal Year
PREVM = w_prevm " Previous Fiscal Month
PREVY = w_prevy. " Previous Fiscal Year
GET_GLOBAL_SYMBOLS Returns a list of all tables, select options, texts, etc for a program. Even includes the text definitions for the selection screen
GET_INCLUDETAB Returns a list of all INCLUDES in a program
GET_JOB_RUNTIME_INFO
Get the current job number from a program. Also returns other useful info about the current job.
GUI_CREATE_DIRECTORY Create a directory on the presentation server
GUI_DELETE_FILE Replaces WS_FILE_DELETE. Delete a file on the presentation server
GUI_DOWNLOAD Replaces WS_DOWNLOAD. Download table from the app server to presentation server
GUI_EXEC Replaces WS_EXECUTE. Start a File or Program Asynchronously with WinExec
GUI_GET_DESKTOP_INFO Replaces WS_QUERY. Delivers Information About the Desktop (client)
GUI_REMOVE_DIRECTORY Delete a directory on the presentation server
GUI_RUN Start a File or Program Asynchronously with ShellExecute
GUI_UPLOAD Replaces WS_UPLOAD. Upoad file from presentation server to the app server
HELP_START Display help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
HELP_VALUES_GET_WITH_TABLE Show a list of possible values for F4 popup help on selection screens. This function module pops up a screen that is just like all the other F4 helps, so it looks like the rest of the SAP system. Very useful for providing dropdowns on fields that do not have them predefined.
Example:
tables: t001w.
DATA: lc_werks LIKE t001w-werks,
ltab_fields LIKE help_value OCCURS 0 with header line,
BEGIN OF ltab_values OCCURS 0,
feld(40) TYPE c,
END OF ltab_values.
*-- Set up fields to retrieve data
ltab_fields-tabname = 'T001W'.
ltab_fields-fieldname = 'WERKS'.
ltab_fields-selectflag = 'X'.
APPEND ltab_fields.
ltab_fields-tabname = 'T001W'.
ltab_fields-fieldname = 'NAME1'.
ltab_fields-selectflag = space.
APPEND ltab_fields.
*-- Fill values
select * from t001w.
ltab_values-feld = t001w-werks.
append ltab_values.
ltab_values-feld = t001w-name1.
append ltab_values.
endselect.
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
fieldname = 'WERKS'
tabname = 'T001W'
title_in_values_list = 'Select a value'
IMPORTING
select_value = lc_werks
TABLES
fields = ltab_fields
valuetab = ltab_values
EXCEPTIONS
field_not_in_ddic = 01
more_then_one_selectfield = 02
no_selectfield = 03.
HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY_FOUND.
Example:
data: ld_date like scal-datum default sy-datum,
lc_holiday_cal_id like scal-hcalid default 'CA',
ltab_holiday_attributes like thol occurs 0 with header line,
lc_holiday_found like scal-indicator.
CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
EXPORTING
date = ld_date
holiday_calendar_id = lc_holiday_cal_id
WITH_HOLIDAY_ATTRIBUTES = 'X'
IMPORTING
HOLIDAY_FOUND = lc_holiday_found
tables
holiday_attributes = ltab_holiday_attributes
EXCEPTIONS
CALENDAR_BUFFER_NOT_LOADABLE = 1
DATE_AFTER_RANGE = 2
DATE_BEFORE_RANGE = 3
DATE_INVALID = 4
HOLIDAY_CALENDAR_ID_MISSING = 5
HOLIDAY_CALENDAR_NOT_FOUND = 6
OTHERS = 7.
if sy-subrc = 0 and
lc_holiday_found = 'X'.
write: / ld_date, 'is a holiday'.
else.
write: / ld_date, 'is not a holiday, or there was an error calling the function'.
endif.
HOLIDAY_GET Provides a table of all the holidays based upon a Factory Calendar &/ Holiday Calendar.
HR_DISPLAY_BASIC_LIST is an HR function, but can be used for any data. You pass it data, and column headers, and it provides a table control with the ability to manipulate the data, and send it to Word or Excel. Also see the additional documentation here.
HR_GET_LEAVE_DATA Get all leave information (includes leave entitlement, used holidays/paid out holidays)
HR_IE_NUM_PRSI_WEEKS Return the number of weeks between two dates.
HR_PAYROLL_PERIODS_GET
Get the payroll period for a particular date. (provided by Francois Henrotte)
Example:
DATA: IT_T549Q TYPE T549Q OCCURS 0 WITH HEADER LINE,
IT_ZL TYPE PC2BF OCCURS 0 WITH HEADER LINE.
W_BEGDA = '20010101'.
W_PERNR = '00000001'.
CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
EXPORTING
get_begda = w_begda
TABLES
get_periods = it_t549q
EXCEPTIONS
no_period_found = 1
no_valid_permo = 2.
CHECK sy-subrc = 0.
CALL FUNCTION 'HR_TIME_RESULTS_GET'
EXPORTING
get_pernr = w_pernr
get_pabrj = it_t549q-pabrj
get_pabrp = it_t549q-pabrp
TABLES
get_zl = it_zl
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5.
NOTE: it_zl-iftyp = 'A' absence
it_zl-iftyp = 'S' at work
HR_TIME_RESULTS_GET
Get the time results for a payroll period. (provided by Francois Henrotte)
Example:
DATA: IT_T549Q TYPE T549Q OCCURS 0 WITH HEADER LINE,
IT_ZL TYPE PC2BF OCCURS 0 WITH HEADER LINE.
W_BEGDA = '20010101'.
W_PERNR = '00000001'.
CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
EXPORTING
get_begda = w_begda
TABLES
get_periods = it_t549q
EXCEPTIONS
no_period_found = 1
no_valid_permo = 2.
CHECK sy-subrc = 0.
CALL FUNCTION 'HR_TIME_RESULTS_GET'
EXPORTING
get_pernr = w_pernr
get_pabrj = it_t549q-pabrj
get_pabrp = it_t549q-pabrp
TABLES
get_zl = it_zl
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5.
NOTE: it_zl-iftyp = 'A' absence
it_zl-iftyp = 'S' at work
INIT_TEXT To load long text into SAP
K_WERKS_OF_BUKRS_FIND Return a list of all plants for a given company code.
LIST_FROM_MEMORY Retrieves the output of a report from memory when the report was executed using SUBMIT... EXPORTING LIST TO MEMORY. See also WRITE_LIST.
LIST_TO_ASCII convert an ABAP report (displayed on screen) from OTF to ASCII format
MBEW_EXTEND
Get the stock position for the previous month. This displays the same info that you see in MM03.
MONTH_NAMES_GET It returns all the month and names in repective language.
MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
Example:
data: new_date type d.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = -5 " Negative to subtract from old date, positive to add
olddate = sy-datum
IMPORTING
NEWDATE = new_date.
write: / new_date.
MS_EXCEL_OLE_STANDARD_OLE will build a file, and automatically start Excel
OTF_CONVERT wraps several other function modules. Will convert OTF to ASCII or PDF
POPUP_TO_CONFIRM_LOSS_OF_DATA Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.
POPUP_TO_CONFIRM_STEP Create a dialog box in which you make a question whether the user wishes to perform the step.
POPUP_TO_CONFIRM_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point during an action.
POPUP_TO_CONFIRM_WITH_VALUE Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.
POPUP_TO_DECIDE Provide user with several choices as radio buttons
POPUP_TO_DECIDE_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.
POPUP_TO_DISPLAY_TEXT Create a dialog box in which you display a two line message
POPUP_TO_SELECT_MONTH Popup to choose a month
POPUP_WITH_TABLE_DISPLAY Provide a display of a table for user to select one, with the value of the table line returned when selected.
PRICING Return pricing conditions in an internal table. Use structure TCOMK for parameter COMM_HEAD_1, and structure TCOMP for parameter COMM_ITEM_1, and set CALCULATION_TYPE to B. The pricing conditions will be returned in XOMV. You must fill TCOMP, and TCOMK with the appropriate values before callling the function in order for it to work.
PROFILE_GET Read an Entry in an INI File on the frontend
PROFILE_SET Write an Entry in an INI File on the frontend
READ_TEXT To load long text into SAP
REGISTRY_GET Read an Entry from the Registry
REGISTRY_SET Set an entry in the Registry
RFC_ABAP_INSTALL_AND_RUN Runs an ABAP program that is stored in the table PROGRAM when the MODE = 'F'. Table WRITES contains the ouput of the program. Allows you to run a program without having the source code in the target system.
RH_GET_ACTIVE_WF_PLVAR Return the active HR Plan
RH_GET_DATE_DAYNAME return the day based on the date provied
RH_START_EXCEL_WITH_DATA starts Excel with the contents of an internal table. This function finds Excel in the desktop registry. It also uses a local PC working directory to save the file (that's what the 'W' value for data path flag does). Very transparent to user!
RH_STRUC_GET Returns all related org info
RHP0_POPUP_F4_SEARK
is a matchcode for any type of HR Planning object, including the possibility to fill the field that you want
Example:
Examples: search for any organizational structure
F4 = 'X'
PLVAR = '01'
OTYPE = 'O '
search for any persons
F4 = 'X'
PLVAR = '01'
OTYPE = 'P '
MULTI_SELECT = 'X' to allow multiple selection
EASY = 'X' for user-dependent matchcode
Unfortunately, the use of table BASE_OBJIDS is disabled, so you can't specify
a root for the hierarchy you display
RKD_WORD_WRAP Convert a long string or phrase into several lines.
RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date
RP_LAST_DAY_OF_MONTHS Determine last day of month
RPY_DYNPRO_READ Read dynpro, including screen flow
RPY_TRANSACTION_READ Given a transaction, return the program and screen or given a program and screen, return the transactions that use the program and screen.
RS_COVERPAGE_SELECTIONS Returns an internal table that contains a formatted list of all the selection parameters entered for a report. Table is ready to print out.
RS_REFRESH_FROM_SELECTOPTIONS Get the current contents of selection screen
RS_SEND_MAIL_FOR_SPOOLLIST Send message from ABAP/4 program to SAPoffice.
RS_VARIANT_CONTENTS Returns the contents of the specified variant in a table.
RSPO_DOWNLOAD_SPOOLJOB Download the spool from a program to a file. Requires spool number.
RSPO_RETURN_ABAP_SPOOLJOB Fetch printer spool according to the spool number informed.
RZL_READ_DIR If the server name is left blank, it reads a directory from local presentation server, otherwise it reads the directory of the remote server
RZL_READ_DIR_LOCAL Read a directory on the Application Server
RZL_READ_FILE Read a file from the presentation server if no server name is given, or read file from remote server. Very useful to avoid authority checks that occur doing an OPEN DATASET. This function using a SAP C program to read the data.
RZL_SLEEP Hang the current application from 1 to 5 seconds.
RZL_SUBMIT Submit a remote report.
RZL_WRITE_FILE_LOCAL Saves table to the presentation server (not PC). Does not use OPEN DATASET, so it does not suffer from authority checks!
SAP_CONVERT_TO_XLS_FORMAT Convert data to Microsoft Excel format.
SAPGUI_PROGRESS_INDICATOR Display a progress bar on the SAP GUI, and give the user some idea of what is happening
SAVE_TEXT To load long text into SAP
SCROLLING_IN_TABLE If you are coding a module pool and using a table control, you can use this function SCROLLING_IN_TABLE to handle any scrolling. (provided by Paul Kjaer)
SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
SO_NEW_DOCUMENT_ATT_SEND_API1 Send a document as part of an email. The documentation is better than normal for this function, so please read it.
SO_SPLIT_FILE_AND_PATH Split a fully pathed filename into a filename and a path.
SO_SPOOL_READ Fetch printer spool according to the spool number informed. See also RSPO_RETURN_ABAP_SPOOLJOB
SO_WIND_SPOOL_LIST Browse printer spool numbers according to user informed.
SWD_HELP_F4_ORG_OBJECTS
HR Matchcode tailored for organizational units. Includes a button so that you can browse the hierarchy too.
SX_OBJECT_CONVERT_OTF_PDF Conversion From OTF to PDF (SAPScript conversion)
SX_OBJECT_CONVERT_OTF_PRT Conversion From OTF to Printer Format (SAPScript conversion)
SX_OBJECT_CONVERT_OTF_RAW Conversion From OTF to ASCII (SAPScript conversion)
SXPG_CALL_SYSTEM you can check the user's authorization for the specified command and run the command. The command runs on the host system on which the function module is executed. The function module is RFC capable. It can therefore be run on the host system at which a user happens to be active or on another designated host system at which an R/3 server is active.
SXPG_COMMAND_CHECK Check whether the user is authorized to execute the specified command on the target host system with the specified arguments.
SXPG_COMMAND_DEFINITION_GET Read the definition of a single external OS command from the R/3 System's database.
SXPG_COMMAND_EXECUTE Check a user's authorization to use a command, as in SXPG_COMMAND_CHECK. If the authorization check is successful, then execute the command on the target host system.
SXPG_COMMAND_LIST_GET Select a list of external OS command definitions.
TERMINAL_ID_GET Return the terminal id
TH_DELETE_USER Logoff a user. Similar results to using SM04.
TH_ENVIRONMENT Get the UNIX environment
TH_POPUP Display a popup system message on a specific users screen.
TH_REMOTE_TRANSACTION Run a transaction on a remote server. Optionally provide BDC data to be used in the transaction
TH_USER_INFO Give information about the current user (sessions, workstation logged in from, etc)
TH_USER_LIST Show which users are logged into an app server
TMP_GUI_DIRECTORY_LIST_FILES Retrieve all of the files and subdirectories on the Presentation Server (PC) for a given directory.
When a value other than * or . is used for the filter, you will not get any directories, unless they match your wildcard filter. For example, if you entered *.png, then only files and directories that end in png will be returned by the function.
Example:
data: lc_directory like bdschko16-target_dir value 'C:\TEMP\',
lc_filter(20) type c default '.'.
li_file_count type i,
li_dir_count type i,
ltab_dir_table like sdokpath occurs 0 with header line,
ltab_file_file_table like sdokpath occurs 0 with header line.
call function 'TMP_GUI_DIRECTORY_LIST_FILES'
exporting
directory = lc_directory
filter = lc_filter importing
file_count = li_file_count
dir_count = li_dir_count
tables
file_table = ltab_file_table
dir_table = ltab_dir_table
exceptions
cntl_error = 1
others = 2.
UNIT_CONVERSION_SIMPLE convert weights from one UOM to another.
UPLOAD upload a file to the presentation server (PC)
UPLOAD_FILES Will load one or more files from app or presentation server
WEEK_GET_FIRST_DAY For a given week (YYYYMM format), this function returns the date of the Monday of that week.
WRITE_LIST Useful for writing out the list contents that result from the function LIST_FROM_MEMORY.
WS_DOWNLOAD Save Internal Table as File on the Presentation Server
WS_EXCEL Start EXCEL on the PC
WS_EXECUTE execute a program on a windows PC
WS_FILE_DELETE Delete File at the Frontend
WS_FILENAME_GET Call File Selector
WS_MSG Create a dialog box in which you display an one line message
WS_UPLOAD Load Files from the Presentation Server to Internal ABAP Tables
WS_VOLUME_GET Get the label from a frontend device.
WWW_LIST_TO_HTML After running a report, call this function to convert the list output to HTML.
hope it will help you.
Regards,
Sreelatha gullapalli -
hi,
in alv's using fuction modules how to add pushbuttons in application tool bar?Hi Ganapathi,
Check out the list of Function Modules
ABAP_DOCU_DOWNLOAD Download ABAP documentation in HTML format.
APPL_LOG_DELETE With this function module you delete logs in the database according to specified selection conditions
APPL_LOG_DISPLAY With this function module you can analyze logs in the database.
APPL_LOG_DISPLAY_INTERN With this function module you can analyze logs in local memory, e.g. when you have only collected log records at runtime and do not want to write to the database.
APPL_LOG_INIT This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
APPL_LOG_READ_DB With this function module you read the log data in the database for an object or sub-object according to specified selection conditions.
APPL_LOG_READ_INTERN With this function module you read all log data whose log class has at least the specified value, from local memory, for the specified object or sub-object.
APPL_LOG_SET_OBJECT With this function module, you create a new object or sub-object for writing in local memory. With a flag you can control whether the APPL_LOG_WRITE_... messages are written in local memory or are output on the screen.
APPL_LOG_WRITE_DB With this function module you write all data for the specified object or sub-object in local memory to the database. If the log for the object or sub-object in question is new, the log number is returned to the calling program.
APPL_LOG_WRITE_HEADER With this function module, you write the log header data in local memory.
APPL_LOG_WRITE_LOG_PARAMETERS With this function module, you write the name of the log parameters and the associated values for the specified object or sub-object in local memory. If this function module is called repeatedly for the same object or sub-object, the existing parameters are updated accordingly. If you do not specify an object or sub-object with the call, the most recently used is assumed.
APPL_LOG_WRITE_MESSAGE_PARAMS With this function module you write a single message, with parameters, in local memory. Otherwise the function module works like APPL_LOG_WRITE_SINGLE_MESSAGE.
APPL_LOG_WRITE_MESSAGES With this function module you write one or more messages, without parameters, in local memory.
APPL_LOG_WRITE_SINGLE_MESSAGE With this function module you write a single message, without parameters, in local memory. If no header entry has yet been written for the object or sub-object, it is created. If you do not specify an object or sub-object with the call, the most recently used is assumed.
ARFC_GET_TID will return the IP address of the terminal in hex.
BAL_CNTL_CREATE Create Control for log display
BAL_CNTL_FREE Release Control
BAL_CNTL_REFRESH Put new data in log display
BAL_DB_DELETE Delete logs from the database
BAL_DB_DEQUEUE Unlock log
BAL_DB_ENQUEUE Lock log
BAL_DB_LOAD Load logs from the database
BAL_DB_LOAD Load log(s)
BAL_DB_SAVE Save logs in the database
BAL_DB_SAVE Save log(s)
BAL_DB_SAVE_PREPARE Prepare save
BAL_DB_SEARCH Find logs in the database
BAL_DSP_LOG_DISPLAY Display messages in memory
BAL_DSP_LOG_DISPLAY Display Log
BAL_DSP_LOG_PARAMETERS Either output extended long text or call a callback routine (based on the data in BAL_S_LOG-PARAMS)
BAL_DSP_LOG_TECHNICAL_DATA Output all log header data
BAL_DSP_MSG_LONGTEXT Display message long text
BAL_DSP_MSG_PARAMETERS Either output extended long text or call a callback routine (based on the data in BAL_S_MSG-PARAMS)
BAL_DSP_MSG_TECHNICAL_DATA Output technical data of a message such as work area, error number, etc.
BAL_DSP_OUTPUT_FREE End output
BAL_DSP_OUTPUT_INIT Initialize output
BAL_DSP_OUTPUT_SET_DATA Set dataset to be displayed
BAL_DSP_PROFILE_DETLEVEL_GET Message hierarchy in DETLEVEL
BAL_DSP_PROFILE_NO_TREE_GET Display without tree (fullscreen)
BAL_DSP_PROFILE_POPUP_GET Display without tree (popup)
BAL_DSP_PROFILE_SINGLE_LOG_GET Standard profile (SLG1) for one log
BAL_DSP_PROFILE_STANDARD_GET Standard profile (SLG1) for a lot of logs
BAL_GLB_AUTHORIZATION_GET Assign authorization
BAL_GLB_AUTHORIZATION_RESET Reset authorization
BAL_GLB_CONFIG_GET Read configuration
BAL_GLB_CONFIG_SET Set configuration
BAL_GLB_MEMORY_EXPORT Put function group memory in ABAP-MEMORY
BAL_GLB_MEMORY_IMPORT Get function group memory from ABAP-MEMORY
BAL_GLB_MEMORY_REFRESH (Partially) reset global memory
BAL_GLB_MEMORY_REFRESH (Partially) initialize memory
BAL_GLB_MSG_CURRENT_HANDLE_GET Get current message handle
BAL_GLB_MSG_DEFAULTS_GET Get message defaults
BAL_GLB_SEARCH_LOG Find logs in memory
BAL_GLB_SEARCH_MSG Find messages in memory
BAL_LOG_CREATE Create log with header data
BAL_LOG_CREATE Create log with header data
BAL_LOG_DELETE Delete log (from database also at Save)
BAL_LOG_EXIST Check existence of a log in memory
BAL_LOG_HDR_CHANGE Change log header
BAL_LOG_HDR_CHECK Check log header data for consistency
BAL_LOG_HDR_READ Read log header and other data
BAL_LOG_MSG_ADD Put message in log
BAL_LOG_MSG_ADD Put message in log
BAL_LOG_MSG_CHANGE Change message
BAL_LOG_MSG_CHANGE Change message
BAL_LOG_MSG_CHECK Check message data for consistency
BAL_LOG_MSG_CUMULATE Add message cumulated
BAL_LOG_MSG_DELETE Delete message
BAL_LOG_MSG_DELETE Delete message
BAL_LOG_MSG_EXIST Check existence of a message in memory
BAL_LOG_MSG_READ Read message and other data
BAL_LOG_MSG_REPLACE Replace last message
BAL_LOG_REFRESH Delete log from memory
BAL_LOG_REFRESH Delete log from memory
BAL_MSG_DISPLAY_ABAP Output message as ABAP-MESSAGE
BAL_OBJECT_SELECT Read Application Log objects table record
BAL_OBJECT_SUBOBJECT Check whether object and subobject exist and the combination is allowed
BAL_SUBOBJECT_SELECT Read subobject table record
BP_EVENT_RAISE Trigger an event from ABAP/4 program
BP_JOBLOG_READ Fetch job log executions
CHANGEDOCUMENT_READ_HEADERS Get the change document header for a sales document, and put the results in an internal table.
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CHANGEDOCUMENT_READ_POSITIONS Get the details of a change document, and store them in an internal table. This will tell you whether a field was changed, deleted, or updated.
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CLAF_CLASSIFICATION_OF_OBJECTS Return all of the characteristics for a material
CLOI_PUT_SIGN_IN_FRONT Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justified as numbers normally are.
CLPB_EXPORT Export a text table to the clipboard (on presentation server)
CLPB_IMPORT Import a Text Table from the Clipboard (on presentation server)
COMMIT_TEXT To load long text into SAP
CONVERSION_EXIT_ALPHA_INPUT converts any number into a string fill with zeroes, with the number at the extreme right
Example:
input = 123
output = 0000000000000...000000000000123
CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a simple integer
Example:
input = 00000000000123
output = 123
CONVERT_ABAPSPOOLJOB_2_PDF convert abap spool output to PDF
CONVERT_OTF Convert SAP documents (SAPScript) to other types.
Example:
CALL FUNCTION "CONVERT_OTF"
EXPORTING FORMAT = "PDF"
IMPORTING BIN_FILESIZE = FILE_LEN
TABLES OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
CONVERT_OTFSPOOLJOB_2_PDF converts a OTF spool to PDF (i.e. Sapscript document)
CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.
CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency
DATE_CHECK_PLAUSIBILITY Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
DATE_GET_WEEK will return the week that a date is in.
DATE_IN_FUTURE Calculate a date N days in the future.
DAY_ATTRIBUTES_GET Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuesday), whether the day is a holiday, and more.(provided by Francois Henrotte)
DOWNLOAD download a file to the presentation server (PC)
DYNP_VALUES_READ Read the values from a dynpro. This function can be used to read the values from a report's selection screen too (Another example).
DYNP_VALUES_UPDATE Similar to DYNP_VALUES_READ, this function will allow the updating of fields on a dynpro. Very useful when you want to change a field based on the value entered for another field.
ENQUE_SLEEP Wait a specified period of time before continuing processing.
ENQUEUE_ESFUNCTION Lock an abap program so that it cannot be executed.
Example:
Set the parameters as follows:
RELID = 'ZZ'
SRTF2 = 0
SRTF = (your report name)
Please note that you should not use SY-REPID to pass your report name to the function. The value of SY-REPID will change as it is being passed to the function module, and will no longer hold the value of the calling report.
EPS_GET_DIRECTORY_LISTING return a list of filenames from a local or network drive
EPS_GET_FILE_ATTRIBUTES Pass in a filename and a path, and will return attributes for the file
F4_DATE displays a calendar in a popup window and allows user to choose a date, or it can be displayed read only.
F4_IF_FIELD_VALUE_REQUEST Use values from a DDIC table to provide a list of possible values. TABNAME and FIELDNAME are required fields, and when MULTIPLE_CHOICE is selected, more than one value can be returned.
F4IF_INT_TABLE_VALUE_REQUEST F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.
Example:
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
o_begru-low = t_return-fieldval.
if o_begru-low = 'PAR*'.
o_begru-option = 'CP'.
else.
o_begru-option = 'EQ'.
endif.
o_begru-sign = 'I'.
append o_begru to s_begru.
else.
o_begru = i_begru.
endif.
F4IF_SHLP_EXIT_EXAMPLE documents the different reasons to use a search help exit, and shows how it is done.
F4IP_INT_TABLE_VALUE_REQUEST This function does not exist in 4.6 and above. Use F4IF_INT_TABLE_VALUE_REQUEST instead.
FILENAME_GET popup to get a filename from a user, returns blank filename if user selects cancel
FORMAT_MESSAGE Takes a message id and number, and puts it into a variable. Works better than WRITE_MESSAGE, since some messages use $ as a place holder, and WRITE_MESSAGE does not accommodate that, it only replaces the ampersands (&) in the message.
FTP_COMMAND Execute a command on the FTP server
FTP_CONNECT Open a connection (and log in) to an FTP server
FTP_DISCONNECT Close the connection (and log off) the FTP server
FU CSAP_MAT_BOM_READ You can use this function module to display simple material BOMs. You cannot display BOM groups (for example, all variants of a variant BOM). as in transaction CS03. Current restrictions: You cannot display long texts. You cannot display sub-items. You cannot display classification data of BOM items for batches. You can only display one alternative or variant. You cannot enter an alternative for module CSAP_MAT_BOM_READ, so you always see alternative 01. The following example came from a posting on the SAP-R3-L mailing list.
Example:
data: begin of tstk2 occurs 0.
include structure stko_api02.
data: end of tstk2.
data: begin of tstp2 occurs 0.
include structure stpo_api02.
data: end of tstp2.
data: begin of tdep_data occurs 0.
include structure csdep_data.
data: end of tdep_data.
data: begin of tdep_descr occurs 0.
include structure csdep_descr.
data: end of tdep_descr.
data: begin of tdep_source occurs 0.
include structure csdep_source.
data: end of tdep_source.
data: begin of tdep_order occurs 0.
include structure csdep_order.
data: end of tdep_order.
data: begin of tdep_doc occurs 0.
include structure csdep_doc.
data: end of tdep_doc.
data: flg_warning like capiflag-flwarning.
call function 'CSAP_MAT_BOM_READ'
exporting
material = 'MAT100'
plant = '0001'
bom_usage = '1'
valid_from = '20.12.1996'
valid_to
importing
fl_warning = flg_warning
tables
t_stko = tstk2
t_stpo = tstp2
t_dep_data = tdep_data
t_dep_descr = tdep_descr
t_dep_source = tdep_source
t_dep_order = tdep_order
t_dep_doc = tdep_doc
exceptions
error = 1.
Function Group GRAP is now obsolete. SAP recommends using functions in function group SFES instead. Below is an overview of the changes.
G_SET_GET_ALL_VALUES Fetch values from a set.
GET_CURRENT_YEAR Get the current fiscal year.
Example:
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = '1000' " Company Code
DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
CURRM = w_currm " Current Fiscal Month
CURRY = w_curry " Current Fiscal Year
PREVM = w_prevm " Previous Fiscal Month
PREVY = w_prevy. " Previous Fiscal Year
GET_GLOBAL_SYMBOLS Returns a list of all tables, select options, texts, etc for a program. Even includes the text definitions for the selection screen
GET_INCLUDETAB Returns a list of all INCLUDES in a program
GET_JOB_RUNTIME_INFO Get the current job number from a program. Also returns other useful info about the current job.
GUI_CREATE_DIRECTORY Create a directory on the presentation server
GUI_DELETE_FILE Replaces WS_FILE_DELETE. Delete a file on the presentation server
GUI_DOWNLOAD Replaces WS_DOWNLOAD. Download table from the app server to presentation server
GUI_EXEC Replaces WS_EXECUTE. Start a File or Program Asynchronously with WinExec
GUI_GET_DESKTOP_INFO Replaces WS_QUERY. Delivers Information About the Desktop (client)
GUI_REMOVE_DIRECTORY Delete a directory on the presentation server
GUI_RUN Start a File or Program Asynchronously with Shell Execute
GUI_UPLOAD Replaces WS_UPLOAD. Upload file from presentation server to the app server
HELP_START Display help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
HELP_VALUES_GET_WITH_TABLE Show a list of possible values for F4 popup help on selection screens. This function module pops up a screen that is just like all the other F4 helps, so it looks like the rest of the SAP system. Very useful for providing dropdowns on fields that do not have them predefined.
Example:
tables: t001w.
DATA: lc_werks LIKE t001w-werks,
ltab_fields LIKE help_value OCCURS 0 with header line,
BEGIN OF ltab_values OCCURS 0,
feld(40) TYPE c,
END OF ltab_values.
*-- Set up fields to retrieve data
ltab_fields-tabname = 'T001W'.
ltab_fields-fieldname = 'WERKS'.
ltab_fields-selectflag = 'X'.
APPEND ltab_fields.
ltab_fields-tabname = 'T001W'.
ltab_fields-fieldname = 'NAME1'.
ltab_fields-selectflag = space.
APPEND ltab_fields.
*-- Fill values
select * from t001w.
ltab_values-feld = t001w-werks.
append ltab_values.
ltab_values-feld = t001w-name1.
append ltab_values.
endselect.
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
fieldname = 'WERKS'
tabname = 'T001W'
title_in_values_list = 'Select a value'
IMPORTING
select_value = lc_werks
TABLES
fields = ltab_fields
valuetab = ltab_values
EXCEPTIONS
field_not_in_ddic = 01
more_then_one_selectfield = 02
no_selectfield = 03.
HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY_FOUND.
Example:
data: ld_date like scal-datum default sy-datum,
lc_holiday_cal_id like scal-hcalid default 'CA',
ltab_holiday_attributes like thol occurs 0 with header line,
lc_holiday_found like scal-indicator.
CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
EXPORTING
date = ld_date
holiday_calendar_id = lc_holiday_cal_id
WITH_HOLIDAY_ATTRIBUTES = 'X'
IMPORTING
HOLIDAY_FOUND = lc_holiday_found
tables
holiday_attributes = ltab_holiday_attributes
EXCEPTIONS
CALENDAR_BUFFER_NOT_LOADABLE = 1
DATE_AFTER_RANGE = 2
DATE_BEFORE_RANGE = 3
DATE_INVALID = 4
HOLIDAY_CALENDAR_ID_MISSING = 5
HOLIDAY_CALENDAR_NOT_FOUND = 6
OTHERS = 7.
if sy-subrc = 0 and
lc_holiday_found = 'X'.
write: / ld_date, 'is a holiday'.
else.
write: / ld_date, 'is not a holiday, or there was an error calling the function'.
endif.
HOLIDAY_GET Provides a table of all the holidays based upon a Factory Calendar &/ Holiday Calendar.
HR_DISPLAY_BASIC_LIST is an HR function, but can be used for any data. You pass it data, and column headers, and it provides a table control with the ability to manipulate the data, and send it to Word or Excel. Also see the additional documentation here.
HR_GET_LEAVE_DATA Get all leave information (includes leave entitlement, used holidays/paid out holidays)
HR_IE_NUM_PRSI_WEEKS Return the number of weeks between two dates.
HR_PAYROLL_PERIODS_GET Get the payroll period for a particular date. (provided by Francois Henrotte)
Example:
DATA: IT_T549Q TYPE T549Q OCCURS 0 WITH HEADER LINE,
IT_ZL TYPE PC2BF OCCURS 0 WITH HEADER LINE.
W_BEGDA = '20010101'.
W_PERNR = '00000001'.
CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
EXPORTING
get_begda = w_begda
TABLES
get_periods = it_t549q
EXCEPTIONS
no_period_found = 1
no_valid_permo = 2.
CHECK sy-subrc = 0.
CALL FUNCTION 'HR_TIME_RESULTS_GET'
EXPORTING
get_pernr = w_pernr
get_pabrj = it_t549q-pabrj
get_pabrp = it_t549q-pabrp
TABLES
get_zl = it_zl
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5.
NOTE: it_zl-iftyp = 'A' absence
it_zl-iftyp = 'S' at work
HR_TIME_RESULTS_GET Get the time results for a payroll period. (provided by Francois Henrotte)
Example:
DATA: IT_T549Q TYPE T549Q OCCURS 0 WITH HEADER LINE,
IT_ZL TYPE PC2BF OCCURS 0 WITH HEADER LINE.
W_BEGDA = '20010101'.
W_PERNR = '00000001'.
CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
EXPORTING
get_begda = w_begda
TABLES
get_periods = it_t549q
EXCEPTIONS
no_period_found = 1
no_valid_permo = 2.
CHECK sy-subrc = 0.
CALL FUNCTION 'HR_TIME_RESULTS_GET'
EXPORTING
get_pernr = w_pernr
get_pabrj = it_t549q-pabrj
get_pabrp = it_t549q-pabrp
TABLES
get_zl = it_zl
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5.
NOTE: it_zl-iftyp = 'A' absence
it_zl-iftyp = 'S' at work
INIT_TEXT To load long text into SAP
K_WERKS_OF_BUKRS_FIND Return a list of all plants for a given company code.
LIST_FROM_MEMORY Retrieves the output of a report from memory when the report was executed using SUBMIT... EXPORTING LIST TO MEMORY. See also WRITE_LIST.
LIST_TO_ASCII convert an ABAP report (displayed on screen) from OTF to ASCII format
MBEW_EXTEND Get the stock position for the previous month. This displays the same info that you see in MM03.
MONTH_NAMES_GET It returns all the month and names in respective language.
MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
Example:
data: new_date type d.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = -5 " Negative to subtract from old date, positive to add
olddate = sy-datum
IMPORTING
NEWDATE = new_date.
write: / new_date.
MS_EXCEL_OLE_STANDARD_OLE will build a file, and automatically start Excel
OTF_CONVERT wraps several other function modules. Will convert OTF to ASCII or PDF
POPUP_TO_CONFIRM_LOSS_OF_DATA Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.
POPUP_TO_CONFIRM_STEP Create a dialog box in which you make a question whether the user wishes to perform the step.
POPUP_TO_CONFIRM_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point during an action.
POPUP_TO_CONFIRM_WITH_VALUE Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.
POPUP_TO_DECIDE Provide user with several choices as radio buttons
POPUP_TO_DECIDE_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.
POPUP_TO_DISPLAY_TEXT Create a dialog box in which you display a two line message
POPUP_TO_SELECT_MONTH Popup to choose a month
POPUP_WITH_TABLE_DISPLAY Provide a display of a table for user to select one, with the value of the table line returned when selected.
PRICING Return pricing conditions in an internal table. Use structure TCOMK for parameter COMM_HEAD_1, and structure TCOMP for parameter COMM_ITEM_1, and set CALCULATION_TYPE to B. The pricing conditions will be returned in XOMV. You must fill TCOMP, and TCOMK with the appropriate values before callling the function in order for it to work.
PROFILE_GET Read an Entry in an INI File on the frontend
PROFILE_SET Write an Entry in an INI File on the frontend
READ_TEXT To load long text into SAP
REGISTRY_GET Read an Entry from the Registry
REGISTRY_SET Set an entry in the Registry
RFC_ABAP_INSTALL_AND_RUN Runs an ABAP program that is stored in the table PROGRAM when the MODE = 'F'. Table WRITES contains the ouput of the program. Allows you to run a program without having the source code in the target system.
RH_GET_ACTIVE_WF_PLVAR Return the active HR Plan
RH_GET_DATE_DAYNAME return the day based on the date provied
RH_START_EXCEL_WITH_DATA starts Excel with the contents of an internal table. This function finds Excel in the desktop registry. It also uses a local PC working directory to save the file (that's what the 'W' value for data path flag does). Very transparent to user!
RH_STRUC_GET Returns all related org info
RHP0_POPUP_F4_SEARK is a matchcode for any type of HR Planning object, including the possibility to fill the field that you want
Example:
Examples: search for any organizational structure
F4 = 'X'
PLVAR = '01'
OTYPE = 'O '
search for any persons
F4 = 'X'
PLVAR = '01'
OTYPE = 'P '
MULTI_SELECT = 'X' to allow multiple selection
EASY = 'X' for user-dependent matchcode
Unfortunately, the use of table BASE_OBJIDS is disabled, so you can't specify
a root for the hierarchy you display
RKD_WORD_WRAP Convert a long string or phrase into several lines.
RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date
RP_LAST_DAY_OF_MONTHS Determine last day of month
RPY_DYNPRO_READ Read dynpro, including screen flow
RPY_TRANSACTION_READ Given a transaction, return the program and screen or given a program and screen, return the transactions that use the program and screen.
RS_COVERPAGE_SELECTIONS Returns an internal table that contains a formatted list of all the selection parameters entered for a report. Table is ready to print out.
RS_REFRESH_FROM_SELECTOPTIONS Get the current contents of selection screen
RS_SEND_MAIL_FOR_SPOOLLIST Send message from ABAP/4 program to SAPoffice.
RS_VARIANT_CONTENTS Returns the contents of the specified variant in a table.
RSPO_DOWNLOAD_SPOOLJOB Download the spool from a program to a file. Requires spool number.
RSPO_RETURN_ABAP_SPOOLJOB Fetch printer spool according to the spool number informed.
RZL_READ_DIR If the server name is left blank, it reads a directory from local presentation server, otherwise it reads the directory of the remote server
RZL_READ_DIR_LOCAL Read a directory on the Application Server
RZL_READ_FILE Read a file from the presentation server if no server name is given, or read file from remote server. Very useful to avoid authority checks that occur doing an OPEN DATASET. This function using a SAP C program to read the data.
RZL_SLEEP Hang the current application from 1 to 5 seconds.
RZL_SUBMIT Submit a remote report.
RZL_WRITE_FILE_LOCAL Saves table to the presentation server (not PC). Does not use OPEN DATASET, so it does not suffer from authority checks!
SAP_CONVERT_TO_XLS_FORMAT Convert data to Microsoft Excel format.
SAPGUI_PROGRESS_INDICATOR Display a progress bar on the SAP GUI, and give the user some idea of what is happening
SAVE_TEXT To load long text into SAP
SCROLLING_IN_TABLE If you are coding a module pool and using a table control, you can use this function SCROLLING_IN_TABLE to handle any scrolling. (provided by Paul Kjaer)
SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
SO_NEW_DOCUMENT_ATT_SEND_API1 Send a document as part of an email. The documentation is better than normal for this function, so please read it.
SO_SPLIT_FILE_AND_PATH Split a fully pathed filename into a filename and a path.
SO_SPOOL_READ Fetch printer spool according to the spool number informed. See also RSPO_RETURN_ABAP_SPOOLJOB
SO_WIND_SPOOL_LIST Browse printer spool numbers according to user informed.
SWD_HELP_F4_ORG_OBJECTS HR Matchcode tailored for organizational units. Includes a button so that you can browse the hierarchy too.
SX_OBJECT_CONVERT_OTF_PDF Conversion From OTF to PDF (SAPScript conversion)
SX_OBJECT_CONVERT_OTF_PRT Conversion From OTF to Printer Format (SAPScript conversion)
SX_OBJECT_CONVERT_OTF_RAW Conversion From OTF to ASCII (SAPScript conversion)
SXPG_CALL_SYSTEM you can check the user's authorization for the specified command and run the command. The command runs on the host system on which the function module is executed. The function module is RFC capable. It can therefore be run on the host system at which a user happens to be active or on another designated host system at which an R/3 server is active.
SXPG_COMMAND_CHECK Check whether the user is authorized to execute the specified command on the target host system with the specified arguments.
SXPG_COMMAND_DEFINITION_GET Read the definition of a single external OS command from the R/3 System's database.
SXPG_COMMAND_EXECUTE Check a user's authorization to use a command, as in SXPG_COMMAND_CHECK. If the authorization check is successful, then execute the command on the target host system.
SXPG_COMMAND_LIST_GET Select a list of external OS command definitions.
TERMINAL_ID_GET Return the terminal id
TH_DELETE_USER Logoff a user. Similar results to using SM04.
TH_ENVIRONMENT Get the UNIX environment
TH_POPUP Display a popup system message on a specific users screen.
TH_REMOTE_TRANSACTION Run a transaction on a remote server. Optionally provide BDC data to be used in the transaction
TH_USER_INFO Give information about the current user (sessions, workstation logged in from, etc)
TH_USER_LIST Show which users are logged into an app server
TMP_GUI_DIRECTORY_LIST_FILES Retrieve all of the files and subdirectories on the Presentation Server (PC) for a given directory.
When a value other than * or . is used for the filter, you will not get any directories, unless they match your wildcard filter. For example, if you entered *.png, then only files and directories that end in png will be returned by the function.
Example:
data: lc_directory like bdschko16-target_dir value 'C:\TEMP\',
lc_filter(20) type c default '.'.
li_file_count type i,
li_dir_count type i,
ltab_dir_table like sdokpath occurs 0 with header line,
ltab_file_file_table like sdokpath occurs 0 with header line.
call function 'TMP_GUI_DIRECTORY_LIST_FILES'
exporting
directory = lc_directory
filter = lc_filter importing
file_count = li_file_count
dir_count = li_dir_count
tables
file_table = ltab_file_table
dir_table = ltab_dir_table
exceptions
cntl_error = 1
others = 2.
UNIT_CONVERSION_SIMPLE convert weights from one UOM to another.
UPLOAD upload a file to the presentation server (PC)
UPLOAD_FILES Will load one or more files from app or presentation server
WEEK_GET_FIRST_DAY For a given week (YYYYMM format), this function returns the date of the Monday of that week.
WRITE_LIST Useful for writing out the list contents that result from the function LIST_FROM_MEMORY.
WS_DOWNLOAD Save Internal Table as File on the Presentation Server
WS_EXCEL Start EXCEL on the PC
WS_EXECUTE execute a program on a windows PC
WS_FILE_DELETE Delete File at the Frontend
WS_FILENAME_GET Call File Selector
WS_MSG Create a dialog box in which you display an one line message
WS_UPLOAD Load Files from the Presentation Server to Internal ABAP Tables
WS_VOLUME_GET Get the label from a frontend device.
WWW_LIST_TO_HTML After running a report, call this function to convert the list output to HTML.
I don't think there is any function module for ALV.
Even for more info Checkout the links
http://www.erpgenie.com/abap/functions.htm
http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
http://www.erpgenie.com/abap/index.htm
http://www.geocities.com/victorav15/sapr3/abapfun.html
Regards,
Chandru -
Function modules to create material master
hi guys! i know there are function modules to create material master but is there any standard program to process mass uploading of data to create material master? thanks.
HI
these are all the different function modules that are availale in abap
ABAP_DOCU_DOWNLOAD Download ABAP documentation in HTML format.
APPL_LOG_DELETE With this function module you delete logs in the database according to specified selection conditions
APPL_LOG_DISPLAY With this function module you can analyze logs in the database.
APPL_LOG_DISPLAY_INTERN With this function module you can analyze logs in local memory, e.g. when you have only collected log records at runtime and do not want to write to the database.
APPL_LOG_INIT This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
APPL_LOG_READ_DB With this function module you read the log data in the database for an object or sub-object according to specified selection conditions.
APPL_LOG_READ_INTERN With this function module you read all log data whose log class has at least the specified value, from local memory, for the specified object or sub-object.
APPL_LOG_SET_OBJECT With this function module, you create a new object or sub-object for writing in local memory. With a flag you can control whether the APPL_LOG_WRITE_... messages are written in local memory or are output on the screen.
APPL_LOG_WRITE_DB With this function module you write all data for the specified object or sub-object in local memory to the database. If the log for the object or sub-object in question is new, the log number is returned to the calling program.
APPL_LOG_WRITE_HEADER With this function module, you write the log header data in local memory.
APPL_LOG_WRITE_LOG_PARAMETERS With this function module, you write the name of the log parameters and the associated values for the specified object or sub-object in local memory. If this function module is called repeatedly for the same object or sub-object, the existing parameters are updated accordingly. If you do not specify an object or sub-object with the call, the most recently used is assumed.
APPL_LOG_WRITE_MESSAGE_PARAMS With this function module you write a single message, with parameters, in local memory. Otherwise the function module works like APPL_LOG_WRITE_SINGLE_MESSAGE.
APPL_LOG_WRITE_MESSAGES With this function module you write one or more messages, without parameters, in local memory.
APPL_LOG_WRITE_SINGLE_MESSAGE With this function module you write a single message, without parameters, in local memory. If no header entry has yet been written for the object or sub-object, it is created. If you do not specify an object or sub-object with the call, the most recently used is assumed.
ARFC_GET_TID will return the IP address of the terminal in hex.
BAL_CNTL_CREATE Create Control for log display
BAL_CNTL_FREE Release Control
BAL_CNTL_REFRESH Put new data in log display
BAL_DB_DELETE Delete logs from the database
BAL_DB_DEQUEUE Unlock log
BAL_DB_ENQUEUE Lock log
BAL_DB_LOAD Load logs from the database
BAL_DB_LOAD Load log(s)
BAL_DB_SAVE Save logs in the database
BAL_DB_SAVE Save log(s)
BAL_DB_SAVE_PREPARE Prepare save
BAL_DB_SEARCH Find logs in the database
BAL_DSP_LOG_DISPLAY Display messages in memory
BAL_DSP_LOG_DISPLAY Display Log
BAL_DSP_LOG_PARAMETERS Either output extended long text or call a callback routine (based on the data in BAL_S_LOG-PARAMS)
BAL_DSP_LOG_TECHNICAL_DATA Output all log header data
BAL_DSP_MSG_LONGTEXT Display message long text
BAL_DSP_MSG_PARAMETERS Either output extended long text or call a callback routine (based on the data in BAL_S_MSG-PARAMS)
BAL_DSP_MSG_TECHNICAL_DATA Output technical data of a message such as work area, error number, etc.
BAL_DSP_OUTPUT_FREE End output
BAL_DSP_OUTPUT_INIT Initialize output
BAL_DSP_OUTPUT_SET_DATA Set dataset to be displayed
BAL_DSP_PROFILE_DETLEVEL_GET Message hierarchy in DETLEVEL
BAL_DSP_PROFILE_NO_TREE_GET Display without tree (fullscreen)
BAL_DSP_PROFILE_POPUP_GET Display without tree (popup)
BAL_DSP_PROFILE_SINGLE_LOG_GET Standard profile (SLG1) for one log
BAL_DSP_PROFILE_STANDARD_GET Standard profile (SLG1) for a lot of logs
BAL_GLB_AUTHORIZATION_GET Assign authorization
BAL_GLB_AUTHORIZATION_RESET Reset authorization
BAL_GLB_CONFIG_GET Read configuration
BAL_GLB_CONFIG_SET Set configuration
BAL_GLB_MEMORY_EXPORT Put function group memory in ABAP-MEMORY
BAL_GLB_MEMORY_IMPORT Get function group memory from ABAP-MEMORY
BAL_GLB_MEMORY_REFRESH (Partially) reset global memory
BAL_GLB_MEMORY_REFRESH (Partially) initialize memory
BAL_GLB_MSG_CURRENT_HANDLE_GET Get current message handle
BAL_GLB_MSG_DEFAULTS_GET Get message defaults
BAL_GLB_SEARCH_LOG Find logs in memory
BAL_GLB_SEARCH_MSG Find messages in memory
BAL_LOG_CREATE Create log with header data
BAL_LOG_CREATE Create log with header data
BAL_LOG_DELETE Delete log (from database also at Save)
BAL_LOG_EXIST Check existence of a log in memory
BAL_LOG_HDR_CHANGE Change log header
BAL_LOG_HDR_CHECK Check log header data for consistency
BAL_LOG_HDR_READ Read log header and other data
BAL_LOG_MSG_ADD Put message in log
BAL_LOG_MSG_ADD Put message in log
BAL_LOG_MSG_CHANGE Change message
BAL_LOG_MSG_CHANGE Change message
BAL_LOG_MSG_CHECK Check message data for consistency
BAL_LOG_MSG_CUMULATE Add message cumulated
BAL_LOG_MSG_DELETE Delete message
BAL_LOG_MSG_DELETE Delete message
BAL_LOG_MSG_EXIST Check existence of a message in memory
BAL_LOG_MSG_READ Read message and other data
BAL_LOG_MSG_REPLACE Replace last message
BAL_LOG_REFRESH Delete log from memory
BAL_LOG_REFRESH Delete log from memory
BAL_MSG_DISPLAY_ABAP Output message as ABAP-MESSAGE
BAL_OBJECT_SELECT Read Application Log objects table record
BAL_OBJECT_SUBOBJECT Check whether object and subobject exist and the combination is allowed
BAL_SUBOBJECT_SELECT Read subobject table record
BP_EVENT_RAISE Trigger an event from ABAP/4 program
BP_JOBLOG_READ Fetch job log executions
CHANGEDOCUMENT_READ_HEADERS Get the change document header for a sales document, and put the results in an internal table.
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CHANGEDOCUMENT_READ_POSITIONS Get the details of a change document, and store them in an internal table. This will tell you whether a field was changed, deleted, or updated.
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CLAF_CLASSIFICATION_OF_OBJECTS Return all of the characteristics for a material
CLOI_PUT_SIGN_IN_FRONT Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.
CLPB_EXPORT Export a text table to the clipboard (on presentation server)
CLPB_IMPORT Import a Text Table from the Clipboard (on presentation server)
COMMIT_TEXT To load long text into SAP
CONVERSION_EXIT_ALPHA_INPUT converts any number into a string fill with zeroes, with the number at the extreme right
Example:
input = 123
output = 0000000000000...000000000000123
CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a simple integer
Example:
input = 00000000000123
output = 123
CONVERT_ABAPSPOOLJOB_2_PDF convert abap spool output to PDF
CONVERT_OTF Convert SAP documents (SAPScript) to other types.
Example:
CALL FUNCTION "CONVERT_OTF"
EXPORTING FORMAT = "PDF"
IMPORTING BIN_FILESIZE = FILE_LEN
TABLES OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
CONVERT_OTFSPOOLJOB_2_PDF converts a OTF spool to PDF (i.e. Sapscript document)
CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.
CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency
DATE_CHECK_PLAUSIBILITY Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
DATE_GET_WEEK will return the week that a date is in.
DATE_IN_FUTURE Calculate a date N days in the future.
DAY_ATTRIBUTES_GET
Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuedsay), whether the day is a holiday, and more.(provided by Francois Henrotte)
DOWNLOAD download a file to the presentation server (PC)
DYNP_VALUES_READ Read the values from a dynpro. This function can be used to read the values from a report's selection screen too (Another example).
DYNP_VALUES_UPDATE Similar to DYNP_VALUES_READ, this function will allow the updating of fields on a dynpro. Very useful when you want to change a field based on the value entered for another field.
ENQUE_SLEEP Wait a specified period of time before continuing processing.
ENQUEUE_ESFUNCTION Lock an abap program so that it cannot be executed.
Example:
Set the parameters as follows:
RELID = 'ZZ'
SRTF2 = 0
SRTF = (your report name)
Please note that you should not use SY-REPID to pass your report name to the function. The value of SY-REPID will change as it is being passed to the function module, and will no longer hold the value of the calling report.
EPS_GET_DIRECTORY_LISTING return a list of filenames from a local or network drive
EPS_GET_FILE_ATTRIBUTES Pass in a filename and a path, and will return attributes for the file
F4_DATE displays a calendar in a popup window and allows user to choose a date, or it can be displayed read only.
F4_IF_FIELD_VALUE_REQUEST Use values from a DDIC table to provide a list of possible values. TABNAME and FIELDNAME are required fields, and when MULTIPLE_CHOICE is selected, more than one value can be returned.
F4IF_INT_TABLE_VALUE_REQUEST F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.
Example:
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
o_begru-low = t_return-fieldval.
if o_begru-low = 'PAR*'.
o_begru-option = 'CP'.
else.
o_begru-option = 'EQ'.
endif.
o_begru-sign = 'I'.
append o_begru to s_begru.
else.
o_begru = i_begru.
endif.
F4IF_SHLP_EXIT_EXAMPLE documents the different reasons to use a search help exit, and shows how it is done.
F4IP_INT_TABLE_VALUE_REQUEST This function does not exist in 4.6 and above. Use F4IF_INT_TABLE_VALUE_REQUEST instead.
FILENAME_GET popup to get a filename from a user, returns blank filename if user selects cancel
FORMAT_MESSAGE Takes a message id and number, and puts it into a variable. Works better than WRITE_MESSAGE, since some messages use $ as a place holder, and WRITE_MESSAGE does not accommadate that, it only replaces the ampersands (&) in the message.
FTP_COMMAND Execute a command on the FTP server
FTP_CONNECT Open a connection (and log in) to an FTP server
FTP_DISCONNECT Close the connection (and log off) the FTP server
FU CSAP_MAT_BOM_READ You can use this function module to display simple material BOMs. You cannot display BOM groups (for example, all variants of a variant BOM). as in transaction CS03. Current restrictions: You cannot display long texts. You cannot display sub-items. You cannot display classification data of BOM items for batches. You can only display one alternative or variant. You cannot enter an alternative for module CSAP_MAT_BOM_READ, so you always see alternative 01. The following example came from a posting on the SAP-R3-L mailing list.
Example:
data: begin of tstk2 occurs 0.
include structure stko_api02.
data: end of tstk2.
data: begin of tstp2 occurs 0.
include structure stpo_api02.
data: end of tstp2.
data: begin of tdep_data occurs 0.
include structure csdep_data.
data: end of tdep_data.
data: begin of tdep_descr occurs 0.
include structure csdep_descr.
data: end of tdep_descr.
data: begin of tdep_source occurs 0.
include structure csdep_source.
data: end of tdep_source.
data: begin of tdep_order occurs 0.
include structure csdep_order.
data: end of tdep_order.
data: begin of tdep_doc occurs 0.
include structure csdep_doc.
data: end of tdep_doc.
data: flg_warning like capiflag-flwarning.
call function 'CSAP_MAT_BOM_READ'
exporting
material = 'MAT100'
plant = '0001'
bom_usage = '1'
valid_from = '20.12.1996'
valid_to
importing
fl_warning = flg_warning
tables
t_stko = tstk2
t_stpo = tstp2
t_dep_data = tdep_data
t_dep_descr = tdep_descr
t_dep_source = tdep_source
t_dep_order = tdep_order
t_dep_doc = tdep_doc
exceptions
error = 1.
Function Group GRAP is now obsolete. SAP recommends using functions in function group SFES instead. Below is an overview of the changes.
G_SET_GET_ALL_VALUES Fetch values from a set.
GET_CURRENT_YEAR Get the current fiscal year.
Example:
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = '1000' " Company Code
DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
CURRM = w_currm " Current Fiscal Month
CURRY = w_curry " Current Fiscal Year
PREVM = w_prevm " Previous Fiscal Month
PREVY = w_prevy. " Previous Fiscal Year
GET_GLOBAL_SYMBOLS Returns a list of all tables, select options, texts, etc for a program. Even includes the text definitions for the selection screen
GET_INCLUDETAB Returns a list of all INCLUDES in a program
GET_JOB_RUNTIME_INFO
Get the current job number from a program. Also returns other useful info about the current job.
GUI_CREATE_DIRECTORY Create a directory on the presentation server
GUI_DELETE_FILE Replaces WS_FILE_DELETE. Delete a file on the presentation server
GUI_DOWNLOAD Replaces WS_DOWNLOAD. Download table from the app server to presentation server
GUI_EXEC Replaces WS_EXECUTE. Start a File or Program Asynchronously with WinExec
GUI_GET_DESKTOP_INFO Replaces WS_QUERY. Delivers Information About the Desktop (client)
GUI_REMOVE_DIRECTORY Delete a directory on the presentation server
GUI_RUN Start a File or Program Asynchronously with ShellExecute
GUI_UPLOAD Replaces WS_UPLOAD. Upoad file from presentation server to the app server
HELP_START Display help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
HELP_VALUES_GET_WITH_TABLE Show a list of possible values for F4 popup help on selection screens. This function module pops up a screen that is just like all the other F4 helps, so it looks like the rest of the SAP system. Very useful for providing dropdowns on fields that do not have them predefined.
Example:
tables: t001w.
DATA: lc_werks LIKE t001w-werks,
ltab_fields LIKE help_value OCCURS 0 with header line,
BEGIN OF ltab_values OCCURS 0,
feld(40) TYPE c,
END OF ltab_values.
*-- Set up fields to retrieve data
ltab_fields-tabname = 'T001W'.
ltab_fields-fieldname = 'WERKS'.
ltab_fields-selectflag = 'X'.
APPEND ltab_fields.
ltab_fields-tabname = 'T001W'.
ltab_fields-fieldname = 'NAME1'.
ltab_fields-selectflag = space.
APPEND ltab_fields.
*-- Fill values
select * from t001w.
ltab_values-feld = t001w-werks.
append ltab_values.
ltab_values-feld = t001w-name1.
append ltab_values.
endselect.
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
fieldname = 'WERKS'
tabname = 'T001W'
title_in_values_list = 'Select a value'
IMPORTING
select_value = lc_werks
TABLES
fields = ltab_fields
valuetab = ltab_values
EXCEPTIONS
field_not_in_ddic = 01
more_then_one_selectfield = 02
no_selectfield = 03.
HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY_FOUND.
Example:
data: ld_date like scal-datum default sy-datum,
lc_holiday_cal_id like scal-hcalid default 'CA',
ltab_holiday_attributes like thol occurs 0 with header line,
lc_holiday_found like scal-indicator.
CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
EXPORTING
date = ld_date
holiday_calendar_id = lc_holiday_cal_id
WITH_HOLIDAY_ATTRIBUTES = 'X'
IMPORTING
HOLIDAY_FOUND = lc_holiday_found
tables
holiday_attributes = ltab_holiday_attributes
EXCEPTIONS
CALENDAR_BUFFER_NOT_LOADABLE = 1
DATE_AFTER_RANGE = 2
DATE_BEFORE_RANGE = 3
DATE_INVALID = 4
HOLIDAY_CALENDAR_ID_MISSING = 5
HOLIDAY_CALENDAR_NOT_FOUND = 6
OTHERS = 7.
if sy-subrc = 0 and
lc_holiday_found = 'X'.
write: / ld_date, 'is a holiday'.
else.
write: / ld_date, 'is not a holiday, or there was an error calling the function'.
endif.
HOLIDAY_GET Provides a table of all the holidays based upon a Factory Calendar &/ Holiday Calendar.
HR_DISPLAY_BASIC_LIST is an HR function, but can be used for any data. You pass it data, and column headers, and it provides a table control with the ability to manipulate the data, and send it to Word or Excel. Also see the additional documentation here.
HR_GET_LEAVE_DATA Get all leave information (includes leave entitlement, used holidays/paid out holidays)
HR_IE_NUM_PRSI_WEEKS Return the number of weeks between two dates.
HR_PAYROLL_PERIODS_GET
Get the payroll period for a particular date. (provided by Francois Henrotte)
Example:
DATA: IT_T549Q TYPE T549Q OCCURS 0 WITH HEADER LINE,
IT_ZL TYPE PC2BF OCCURS 0 WITH HEADER LINE.
W_BEGDA = '20010101'.
W_PERNR = '00000001'.
CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
EXPORTING
get_begda = w_begda
TABLES
get_periods = it_t549q
EXCEPTIONS
no_period_found = 1
no_valid_permo = 2.
CHECK sy-subrc = 0.
CALL FUNCTION 'HR_TIME_RESULTS_GET'
EXPORTING
get_pernr = w_pernr
get_pabrj = it_t549q-pabrj
get_pabrp = it_t549q-pabrp
TABLES
get_zl = it_zl
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5.
NOTE: it_zl-iftyp = 'A' absence
it_zl-iftyp = 'S' at work
HR_TIME_RESULTS_GET
Get the time results for a payroll period. (provided by Francois Henrotte)
Example:
DATA: IT_T549Q TYPE T549Q OCCURS 0 WITH HEADER LINE,
IT_ZL TYPE PC2BF OCCURS 0 WITH HEADER LINE.
W_BEGDA = '20010101'.
W_PERNR = '00000001'.
CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
EXPORTING
get_begda = w_begda
TABLES
get_periods = it_t549q
EXCEPTIONS
no_period_found = 1
no_valid_permo = 2.
CHECK sy-subrc = 0.
CALL FUNCTION 'HR_TIME_RESULTS_GET'
EXPORTING
get_pernr = w_pernr
get_pabrj = it_t549q-pabrj
get_pabrp = it_t549q-pabrp
TABLES
get_zl = it_zl
EXCEPTIONS
no_period_specified = 1
wrong_cluster_version = 2
no_read_authority = 3
cluster_archived = 4
technical_error = 5.
NOTE: it_zl-iftyp = 'A' absence
it_zl-iftyp = 'S' at work
INIT_TEXT To load long text into SAP
K_WERKS_OF_BUKRS_FIND Return a list of all plants for a given company code.
LIST_FROM_MEMORY Retrieves the output of a report from memory when the report was executed using SUBMIT... EXPORTING LIST TO MEMORY. See also WRITE_LIST.
LIST_TO_ASCII convert an ABAP report (displayed on screen) from OTF to ASCII format
MBEW_EXTEND
Get the stock position for the previous month. This displays the same info that you see in MM03.
MONTH_NAMES_GET It returns all the month and names in repective language.
MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
Example:
data: new_date type d.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = -5 " Negative to subtract from old date, positive to add
olddate = sy-datum
IMPORTING
NEWDATE = new_date.
write: / new_date.
MS_EXCEL_OLE_STANDARD_OLE will build a file, and automatically start Excel
OTF_CONVERT wraps several other function modules. Will convert OTF to ASCII or PDF
POPUP_TO_CONFIRM_LOSS_OF_DATA Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.
POPUP_TO_CONFIRM_STEP Create a dialog box in which you make a question whether the user wishes to perform the step.
POPUP_TO_CONFIRM_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point during an action.
POPUP_TO_CONFIRM_WITH_VALUE Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.
POPUP_TO_DECIDE Provide user with several choices as radio buttons
POPUP_TO_DECIDE_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.
POPUP_TO_DISPLAY_TEXT Create a dialog box in which you display a two line message
POPUP_TO_SELECT_MONTH Popup to choose a month
POPUP_WITH_TABLE_DISPLAY Provide a display of a table for user to select one, with the value of the table line returned when selected.
PRICING Return pricing conditions in an internal table. Use structure TCOMK for parameter COMM_HEAD_1, and structure TCOMP for parameter COMM_ITEM_1, and set CALCULATION_TYPE to B. The pricing conditions will be returned in XOMV. You must fill TCOMP, and TCOMK with the appropriate values before callling the function in order for it to work.
PROFILE_GET Read an Entry in an INI File on the frontend
PROFILE_SET Write an Entry in an INI File on the frontend
READ_TEXT To load long text into SAP
REGISTRY_GET Read an Entry from the Registry
REGISTRY_SET Set an entry in the Registry
RFC_ABAP_INSTALL_AND_RUN Runs an ABAP program that is stored in the table PROGRAM when the MODE = 'F'. Table WRITES contains the ouput of the program. Allows you to run a program without having the source code in the target system.
RH_GET_ACTIVE_WF_PLVAR Return the active HR Plan
RH_GET_DATE_DAYNAME return the day based on the date provied
RH_START_EXCEL_WITH_DATA starts Excel with the contents of an internal table. This function finds Excel in the desktop registry. It also uses a local PC working directory to save the file (that's what the 'W' value for data path flag does). Very transparent to user!
RH_STRUC_GET Returns all related org info
RHP0_POPUP_F4_SEARK
is a matchcode for any type of HR Planning object, including the possibility to fill the field that you want
Example:
Examples: search for any organizational structure
F4 = 'X'
PLVAR = '01'
OTYPE = 'O '
search for any persons
F4 = 'X'
PLVAR = '01'
OTYPE = 'P '
MULTI_SELECT = 'X' to allow multiple selection
EASY = 'X' for user-dependent matchcode
Unfortunately, the use of table BASE_OBJIDS is disabled, so you can't specify
a root for the hierarchy you display
RKD_WORD_WRAP Convert a long string or phrase into several lines.
RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date
RP_LAST_DAY_OF_MONTHS Determine last day of month
RPY_DYNPRO_READ Read dynpro, including screen flow
RPY_TRANSACTION_READ Given a transaction, return the program and screen or given a program and screen, return the transactions that use the program and screen.
RS_COVERPAGE_SELECTIONS Returns an internal table that contains a formatted list of all the selection parameters entered for a report. Table is ready to print out.
RS_REFRESH_FROM_SELECTOPTIONS Get the current contents of selection screen
RS_SEND_MAIL_FOR_SPOOLLIST Send message from ABAP/4 program to SAPoffice.
RS_VARIANT_CONTENTS Returns the contents of the specified variant in a table.
RSPO_DOWNLOAD_SPOOLJOB Download the spool from a program to a file. Requires spool number.
RSPO_RETURN_ABAP_SPOOLJOB Fetch printer spool according to the spool number informed.
RZL_READ_DIR If the server name is left blank, it reads a directory from local presentation server, otherwise it reads the directory of the remote server
RZL_READ_DIR_LOCAL Read a directory on the Application Server
RZL_READ_FILE Read a file from the presentation server if no server name is given, or read file from remote server. Very useful to avoid authority checks that occur doing an OPEN DATASET. This function using a SAP C program to read the data.
RZL_SLEEP Hang the current application from 1 to 5 seconds.
RZL_SUBMIT Submit a remote report.
RZL_WRITE_FILE_LOCAL Saves table to the presentation server (not PC). Does not use OPEN DATASET, so it does not suffer from authority checks!
SAP_CONVERT_TO_XLS_FORMAT Convert data to Microsoft Excel format.
SAPGUI_PROGRESS_INDICATOR Display a progress bar on the SAP GUI, and give the user some idea of what is happening
SAVE_TEXT To load long text into SAP
SCROLLING_IN_TABLE If you are coding a module pool and using a table control, you can use this function SCROLLING_IN_TABLE to handle any scrolling. (provided by Paul Kjaer)
SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
SO_NEW_DOCUMENT_ATT_SEND_API1 Send a document as part of an email. The documentation is better than normal for this function, so please read it.
SO_SPLIT_FILE_AND_PATH Split a fully pathed filename into a filename and a path.
SO_SPOOL_READ Fetch printer spool according to the spool number informed. See also RSPO_RETURN_ABAP_SPOOLJOB
SO_WIND_SPOOL_LIST Browse printer spool numbers according to user informed.
SWD_HELP_F4_ORG_OBJECTS
HR Matchcode tailored for organizational units. Includes a button so that you can browse the hierarchy too.
SX_OBJECT_CONVERT_OTF_PDF Conversion From OTF to PDF (SAPScript conversion)
SX_OBJECT_CONVERT_OTF_PRT Conversion From OTF to Printer Format (SAPScript conversion)
SX_OBJECT_CONVERT_OTF_RAW Conversion From OTF to ASCII (SAPScript conversion)
SXPG_CALL_SYSTEM you can check the user's authorization for the specified command and run the command. The command runs on the host system on which the function module is executed. The function module is RFC capable. It can therefore be run on the host system at which a user happens to be active or on another designated host system at which an R/3 server is active.
SXPG_COMMAND_CHECK Check whether the user is authorized to execute the specified command on the target host system with the specified arguments.
SXPG_COMMAND_DEFINITION_GET Read the definition of a single external OS command from the R/3 System's database.
SXPG_COMMAND_EXECUTE Check a user's authorization to use a command, as in SXPG_COMMAND_CHECK. If the authorization check is successful, then execute the command on the target host system.
SXPG_COMMAND_LIST_GET Select a list of external OS command definitions.
TERMINAL_ID_GET Return the terminal id
TH_DELETE_USER Logoff a user. Similar results to using SM04.
TH_ENVIRONMENT Get the UNIX environment
TH_POPUP Display a popup system message on a specific users screen.
TH_REMOTE_TRANSACTION Run a transaction on a remote server. Optionally provide BDC data to be used in the transaction
TH_USER_INFO Give information about the current user (sessions, workstation logged in from, etc)
TH_USER_LIST Show which users are logged into an app server
TMP_GUI_DIRECTORY_LIST_FILES Retrieve all of the files and subdirectories on the Presentation Server (PC) for a given directory.
When a value other than * or . is used for the filter, you will not get any directories, unless they match your wildcard filter. For example, if you entered *.png, then only files and directories that end in png will be returned by the function.
Example:
data: lc_directory like bdschko16-target_dir value 'C:\TEMP\',
lc_filter(20) type c default '.'.
li_file_count type i,
li_dir_count type i,
ltab_dir_table like sdokpath occurs 0 with header line,
ltab_file_file_table like sdokpath occurs 0 with header line.
call function 'TMP_GUI_DIRECTORY_LIST_FILES'
exporting
directory = lc_directory
filter = lc_filter importing
file_count = li_file_count
dir_count = li_dir_count
tables
file_table = ltab_file_table
dir_table = ltab_dir_table
exceptions
cntl_error = 1
others = 2.
UNIT_CONVERSION_SIMPLE convert weights from one UOM to another.
UPLOAD upload a file to the presentation server (PC)
UPLOAD_FILES Will load one or more files from app or presentation server
WEEK_GET_FIRST_DAY For a given week (YYYYMM format), this function returns the date of the Monday of that week.
WRITE_LIST Useful for writing out the list contents that result from the function LIST_FROM_MEMORY.
WS_DOWNLOAD Save Internal Table as File on the Presentation Server
WS_EXCEL Start EXCEL on the PC
WS_EXECUTE execute a program on a windows PC
WS_FILE_DELETE Delete File at the Frontend
WS_FILENAME_GET Call File Selector
WS_MSG Create a dialog box in which you display an one line message
WS_UPLOAD Load Files from the Presentation Server to Internal ABAP Tables
WS_VOLUME_GET Get the label from a frontend device.
WWW_LIST_TO_HTML After running a report, call this function to convert the list output to HTML.
hope it will help you
regards
sreelatha gullapalli -
Fax function of HP LaserJet Enterprise 500 Color MFP M575
Hi,
I am one of users of HP LaserJet Enterprise 500 Color MFP M575.
I would like to know can I set the printer do not print my fax number and fax header on paper when I fax my document to others.
I had login as admin but I did not see where I can config it.
Thank you.
Regards,
Jimmy PunThere is no change to this problem after 6 months since the last post. Put simply, and as stated in the previous posts, there is no way to scan a document and receive the image on your PC. If you are working with graphics for any length of time or want to create an image for inclusion as an image in a document or web page using this piece of equipment will not allow you to do so.
Great shame as every other function works well - it cannot be beyond the wit of HP to include a Windows application that enables you to scan an image, receive it in the software you are using at the time (e.g. Outlook, Word, Photoshop...) and use it in your work.
HP Printers several years older than this £1000+ Enterprise printer were able to do this simple job and have done so for a great many years. Just being able to use Microsoft's Fax and Scan would be start.
Maybe you are looking for
-
Export is not exporting the data from Page. It always gets the data from VO
Hi, I have got a critical issue, where I am Not able to export the current data from the page. I have an export button and the VO is attached to it. 1) My page will execute the VO and I do some calculations to remove some rows, add the grand total et
-
Condition types restriction at only certain combination like Country/Tax
Dear All In FV11/12, with object V_KONH_VKS we can restrict users accessing certain condition types (field - KSCHL). My query is that I have few condition types accessed by various Plants i.e. common across Plants/Company Codes. Hence would like to r
-
Hi, How to hide the rows in cross table.. Re gads, G
-
How to create a Game where each answer controls a flash animation?
Hi, I need to create a quiz where each correct answer advances a character on a game board and each incorrect answer advances the "enemy" character. At the end the results need to be saved to a MySQL database. Is this possible with Captivate? Curre
-
JSF component processing order
Hi, I'm facing a problem with the order that JSF uses to process the components of a JSP page. If you set two lists of checkboxes, both with the same list in the backing bean, when you change the status on the first list it may not be readed by the s