Using 'F4IF_INT_TABLE_VALUE_REQUEST'
Hi,
I am running the following program. I am using 'F4IF_INT_TABLE_VALUE_REQUEST' to pop-up value request. I see that it is picking up the Heading label of data element FAKSP_AP (BB) as heading of the table within the window.
Please let me know how to display long text of the data element as heading.
Thanks,
Mallikarjun
Tables vbap.
select-options s_faksp FOR vbap-faksp DEFAULT 'AB' OBLIGATORY MODIF ID
DSP.
INITIALIZATION.
Add Billing Block Code 'YY' by default on selection screen
MOVE:
'I' TO s_faksp-sign,
'EQ' TO s_faksp-option,
'CD' TO s_faksp-low.
APPEND s_faksp.
CLEAR s_faksp.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'DSP'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_faksp-LOW.
data:
begin of t_values occurs 2,
value like s_faksp-LOW,
end of t_values,
t_return like ddshretval occurs 0 with header line.
loop at s_faksp.
t_values-value = s_faksp-LOW.
append t_values.
endloop.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 's_faksp-LOW'
value_org = 'S'
MULTIPLE_CHOICE = 'X'
DISPLAY = 'X'
WINDOW_TITLE = 'Build Block Code'
VALUE = 'BBC'
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.
endif.
Hi,
Check this link & program
Re: Function 'F4IF_INT_TABLE_VALUE_REQUEST'
TABLES t005t.
DATA : it_t005t TYPE TABLE OF t005t,
wa_t005t LIKE LINE OF it_t005t.
TYPES : BEGIN OF st_value_typ,
value(50),
END OF st_value_typ.
DATA : it_value TYPE TABLE OF st_value_typ,
wa_value LIKE LINE OF it_value.
DATA : it_field_tab TYPE TABLE OF dfies,
wa_field LIKE LINE OF it_field_tab,
it_return_tab TYPE TABLE OF ddshretval,
wa_return LIKE LINE OF it_return_tab.
PARAMETERS : p1(2) . "like t005t-land1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p1.
PERFORM show_values.
*& Form show_values
text
FORM show_values.
SELECT land1 landx natio FROM t005t
INTO CORRESPONDING FIELDS OF TABLE it_t005t
WHERE spras = 'EN'.
CLEAR wa_field.
wa_field-tabname = 'T005T'.
wa_field-fieldname = 'LAND1'.
APPEND wa_field TO it_field_tab.
CLEAR wa_field.
wa_field-tabname = 'T005T'.
wa_field-fieldname = 'LANDX'.
APPEND wa_field TO it_field_tab.
CLEAR wa_field.
wa_field-tabname = 'T005T'.
wa_field-fieldname = 'NATIO'.
APPEND wa_field TO it_field_tab.
CLEAR it_value.
LOOP AT it_t005t INTO wa_t005t.
wa_value-value = wa_t005t-land1.
APPEND wa_value TO it_value.
wa_value-value = wa_t005t-landx.
APPEND wa_value TO it_value.
wa_value-value = wa_t005t-natio.
APPEND wa_value TO it_value.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LAND1'
TABLES
value_tab = it_value
field_tab = it_field_tab
return_tab = it_return_tab
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.
ELSE.
READ TABLE it_return_tab INTO wa_return INDEX 1.
p1 = wa_return-fieldval.
ENDIF.
ENDFORM. " show_values
Thanks & Regards,
Judith.
Similar Messages
-
About using F4IF_INT_TABLE_VALUE_REQUEST
Hi Experts
i want to use F4IF_INT_TABLE_VALUE_REQUEST to show popup with two columns according to type definition below. as the second field "DES" is not refering to any table field or data element, therefroe, i am using TYPE C length 200 to declare it.
TYPES: BEGIN OF TY_S,
ZZJCLB TYPE ZZJCLB1-ZZJCLB, * ID
DES TYPE c length 200, *Description
END OF TY_S.
After calling function module like below. Currently, The popup only shows one column. So, my question is how to show the second column for field DES with column title i want?
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
* DDIC_STRUCTURE = ' '
RETFIELD = 'ZZJCLB'
* PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
* DYNPROFIELD = ' '
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
VALUE_ORG = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
VALUE_TAB = it_values_new
* FIELD_TAB =
* RETURN_TAB =
* DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3Hi, SAP Guy
Do the following Change in types it will solve out your problem,
TYPES: BEGIN OF ty_s,
zzjclb TYPE zzjclb1-zzjclb, " ID
des TYPE char200, " Description Change Here
END OF ty_s.
Best Regards,
Faisal -
How to use - F4IF_INT_TABLE_VALUE_REQUEST
Hi,
How I have to use the function module "F4IF_INT_TABLE_VALUE_REQUEST". I am not getting any values in return.
thanks,
bsv.select kunnr name1
from kna1
into table it_valid.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
ddic_structure = 'Z20S_KNA1'
retfield = 'CUSTNUM'
PVALKEY = ' '
dynpprog = 'SAPMZ20_CUSTDAY2'
dynpnr = '706'
dynprofield = 'Z20T_KNA1-CUSTNUM'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = it_valid
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. -
Hi.,
I am using FM F4IF_INT_TABLE_VALUE_REQUEST to display F4 for a Particular field .
But while displaying a field(ISBN) with 13 characters is displayed only with value of 8 characters only. kindly advice.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'ESTNO'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC001_ESTMAST_HD'.
IT_FT-FIELDNAME = 'VERSN'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'VERSN'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'SIRNO'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'TITNR'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'KUNNR'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'NAME1'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'JBDVN'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'MAKTX'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'TPWRK'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'ISBNO'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'ORDDAT'.
APPEND IT_FT.
IT_DM-FLDNAME = 'ESTNO'.
IT_DM-DYFLDNAME = 'IT_ESTMAS-ESTNO'.
APPEND IT_DM.
IT_DM-FLDNAME = 'VERSN'.
IT_DM-DYFLDNAME = 'IT_ESTMAS-VERSN'.
APPEND IT_DM.
IT_DM-FLDNAME = 'SIRNO'.
IT_DM-DYFLDNAME = 'IT_ESTMAS-SIRNO'.
APPEND IT_DM.
IT_DM-FLDNAME = 'SERIS'.
IT_DM-DYFLDNAME = 'ZV001_TITLMAS_HD'.
APPEND IT_DM.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'IT_VALUE'
DDIC_STRUCTURE = 'ZC002_ESTNOF4'
RETFIELD = 'ESTNO'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'IT_ESTMAS-ESTNO'
VALUE_ORG = 'S'
STEPL = 0
TABLES
VALUE_TAB = IT_MESTNO_F4
FIELD_TAB = IT_FT
RETURN_TAB = IT_RT
DYNPFLD_MAPPING = IT_DM
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.
Regards.,
S.SivakumarHi.,
i think i confused u all . i will paste the entire code here .
DATA : BEGIN OF IT_MESTNO_F4 OCCURS 0,
MANDT LIKE ZC001_ESTMAST_HD-MANDT,
ESTNO LIKE ZC001_ESTMAST_HD-ESTNO,
VERSN LIKE ZC001_ESTMAST_HD-VERSN,
SIRNO LIKE ZC001_ESTMAST_HD-SIRNO,
TITNR LIKE ZV001_TITLMAS_HD-TITNR,
TPWRK LIKE ZV001_TITLMAS_HD-TPWRK,
KUNNR LIKE ZC001_ESTMAST_HD-KUNNR,
NAME1 LIKE KNA1-NAME1,
JBDVN LIKE ZC001_ESTMAST_HD-JBDVN,
MAKTX LIKE ZV001_TITLMAS_HD-MAKTX,
ISBNO TYPE ZV001_TITLMAS_HD-ISBNO,
END OF IT_MESTNO_F4.
CLEAR: IT_MESTNO_F4[], IT_MESTNO_F4,
IT_FT[], IT_FT,
IT_DM[], IT_DM,
IT_RT[], IT_RT.
*ORDDAT
SELECT DISTINCT ESTNO VERSN SIRNO FROM ZC001_BUDMAS_MAT INTO CORRESPONDING FIELDS OF TABLE IT_MESTNO_F4.
SELECT ESTNO VERSN SIRNO FROM ZC001_ESTMAST_HD INTO CORRESPONDING FIELDS OF TABLE IT_MESTNO_F4 WHERE ZSAVE EQ 'X'..
SELECT DISTINCT A~ESTNO A~VERSN A~SIRNO A~TITNR A~TPWRK A~KUNNR D~NAME1 JBDVN B~MAKTX ISBNO
FROM ZC001_ESTMAST_HD AS A INNER JOIN ZV001_TITLMAS_HD AS B
ON A~TITNR = B~TITNR
INNER JOIN ZC001_BUDMAS_MAT AS C
ON A~ESTNO = C~ESTNO AND A~VERSN = C~VERSN AND A~SIRNO = C~SIRNO
INNER JOIN KNA1 AS D
ON A~KUNNR = D~KUNNR
INTO CORRESPONDING FIELDS OF TABLE IT_MESTNO_F4
WHERE ZSAVE EQ SPACE AND ZLOCK EQ SPACE.
SORT IT_MESTNO_F4 BY ESTNO DESCENDING.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'ESTNO'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC001_ESTMAST_HD'.
IT_FT-FIELDNAME = 'VERSN'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'VERSN'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'SIRNO'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'TITNR'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'KUNNR'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'NAME1'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'JBDVN'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'MAKTX'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'TPWRK'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'ISBNO'.
APPEND IT_FT.
IT_FT-TABNAME = 'ZC002_ESTNOF4'.
IT_FT-FIELDNAME = 'ORDDAT'.
APPEND IT_FT.
IT_DM-FLDNAME = 'ESTNO'.
IT_DM-DYFLDNAME = 'IT_ESTMAS-ESTNO'.
APPEND IT_DM.
IT_DM-FLDNAME = 'VERSN'.
IT_DM-DYFLDNAME = 'IT_ESTMAS-VERSN'.
APPEND IT_DM.
IT_DM-FLDNAME = 'SIRNO'.
IT_DM-DYFLDNAME = 'IT_ESTMAS-SIRNO'.
APPEND IT_DM.
IT_DM-FLDNAME = 'SERIS'.
IT_DM-DYFLDNAME = 'ZV001_TITLMAS_HD'.
APPEND IT_DM.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = 'IT_VALUE'
DDIC_STRUCTURE = 'ZC002_ESTNOF4'
RETFIELD = 'ESTNO'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'IT_ESTMAS-ESTNO'
VALUE_ORG = 'S'
STEPL = 0
TABLES
VALUE_TAB = IT_MESTNO_F4
FIELD_TAB = IT_FT
RETURN_TAB = IT_RT
DYNPFLD_MAPPING = IT_DM
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.
Regards.,
S.Sivakumar -
I am using FM - F4IF_INT_TABLE_VALUE_REQUEST on a selection screenf field. After that I do some validation and throw an error message in the at selection screen event.
But this results in DYNPRO_MSG_IN_HELP error.
I need to have the error message. I cannot change it to Info or Success message. (Program doesn't give run time error if i change the message to S or I or W ). How do I get around this ? What is wrong with F4IF_INT_TABLE_VALUE_REQUEST .
Am I not calling it correctly ?
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CLASS' "Field from it_class
dynpprog = sy-cprog "Program
dynpnr = sy-dynnr "Dynpro number
dynprofield = 'P_FOLD' "Select-options field
value_org = 'S' "Value return: C: cell by cell, "S: structured
display = 'F' "Override readiness for input
TABLES
value_tab = it_class "table with selection values
return_tab = t_return "Return value
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Error Message: The program attempted to issue a " " message during "F4" processing.
This is an illegal operation.
The program was terminated.
Screen name.............. "ZMMR0010_INFORECORD_UPDT"
Screen number............ 0200
Edited by: Shareen Hegde on Mar 29, 2011 1:47 AMHi,
ther are 3 things you can change.
Parameter dynpprog shouldn't be sy-cprog or sy-repid. Please decalre a variable where you can pass the value of sy-cprog to and give it to that parameter.
Parameter dynpnr shouldn't be sy-dynnr. Please decalre a variable where you can pass the value of sy-dynnr to and give it to that parameter.
Parameter display is of type DDBOOL_D and can have value 'X' or SPACE (see fix values of domain DDBOOL!).
Regards,
Klaus -
I have two parameters on selection screen .
P_QTR and P_YEAR
I have concatenated the Quarter and Year Value to give same f4 on both paramatersto give f4 using 'F4IF_INT_TABLE_VALUE_REQUEST'
for example Q1 2014
now when user selects one value i want to set Q1 to P_QTR and 2014 to P_YEAR.
but it is setting only one value for P_QTR correctly and the value for P_year is not coming on screen although the value is thier inside code in P_year
i am using same f4 for both events
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_qtr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_year.
here is the code i am using
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CHAR20'
window_title = text-026
value_org = 'S'
TABLES
value_tab = mt_input_f4
return_tab = mt_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
CLEAR mt_input_f4[].
ENDIF.
READ TABLE mt_return INTO ms_return INDEX 1.
IF sy-subrc EQ 0.
p_qtr = ms_return-fieldval+0(2).
p_year = ms_return-fieldval+3(4) .
ENDIF.
plz chk attached picsi am sorry for delayed update but i fixed it using following approach.
READ TABLE mt_return INTO ms_return INDEX 1.
IF sy-subrc EQ 0.
ls_dynpread-fieldname = 'P_QTR'.
ls_dynpread-fieldvalue = ms_return-fieldval+0(2).
APPEND ls_dynpread TO lt_dynpread.
ls_dynpread-fieldname = 'P_YEAR'.
ls_dynpread-fieldvalue = ms_return-fieldval+3(4).
APPEND ls_dynpread TO lt_dynpread.
**setting the selection screen values
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = '1000'
TABLES
dynpfields = lt_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
CLEAR lt_dynpread[].
ENDIF. -
F4IF_INT_TABLE_VALUE_REQUEST and first selection of mult
Hi All,
I am using F4IF_INT_TABLE_VALUE_REQUEST and it works well, except for the first time.This is a regular report type program.
o If one item/line is selected the first time, nothing is returned to the screen fields.
o If more than one item is selected, the first one is lost. The second and other lines make it back to the screen field.
o The actual values are not displayed until I right-click and select the 'multiple selection' option.
o The next multiple selects always returns correctly- Whatever is chosen makes it to the bottom of the screen field.
Using StepL or not does not seem to make a difference.
Call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = RtField
dynpprog = l_prog
dynpnr = l_screen
dynprofield = specifichlpfld
Value_org = 'C'
WINDOW_TITLE = WinTitle
MULTIPLE_CHOICE = 'X'
TABLES
field_Tab = OutField_Tab
value_tab = OutUsrAddrs
RETURN_TAB = RETURN_TAB.
Thanks for any help,
Dan P.Hi All,
This is the code that shows the problem. It can be cut/pasted into a program for demostration.
*& Report YDMP_TRY2F4IN_INT_TABLE_VAL_RE *
*& Author: Daniel Perecky *
*& Test prg for function module call F4IF_INT_TABLE_VALUE_REQUEST. *
*& Works, kind of. *
*& o If one item/line is selected the first time, nothing is *
*& returned to the screen fields. *
*& o If more than one item is selected, the first one is lost. The *
*& second and other lines make it back to the screen field. *
*& o The actual values are not displayed until I right-click *
*& and select the 'multiple selection' option. *
*& o The next multiple selects always returns correctly- Whatever is *
*& chosen makes it to the bottom of the screen field. *
REPORT YDMP_TRY3F4IN_INT_TABLE_VAL_RE .
Tables: User_Addrs.
Selection-Screen Begin of Block EMAILN.
Selection-Screen Skip.
Selection-screen Begin of Line.
Selection-Screen Comment 1(25) Text-013.
Selection-screen End of Line.
Selection-screen Begin of Line.
Selection-Screen Comment 1(12) Text-015.
Selection-Screen Position 10.
Select-Options: GnrlF for USER_ADDRS-Name_First.
Selection-Screen Position 63.
Select-Options: GnrlL for USER_ADDRS-NAME_Last.
Selection-screen End of Line.
Selection-screen Begin of Line.
Selection-Screen Position 68.
Select-Options: GnrlSpMl for User_Addrs-BName.
Selection-screen End of Line.
Selection-Screen Skip.
Selection-Screen End of Block EMAILN.
Include type pool SSCR
TYPE-POOLS SSCR.
Define the object to be passed to the RESTRICTION parameter
DATA RESTRICT TYPE SSCR_RESTRICT.
DATA OPT_LIST TYPE SSCR_OPT_LIST.
DATA ASSRTD TYPE SSCR_***.
CLASS CX_RPTERR_EXCEPTION DEFINITIO
CLASS CX_RPTERR_EXCEPTION DEFINITION
INHERITING FROM CX_STATIC_CHECK.
ENDCLASS. "CX_RPTERR_EXCEPTION DEFINITIO
Initialization.
Used for function module: 'SELECT_OPTIONS_RESTRICT'
Clear Opt_List.
Move 'JUST_EQ' to Opt_List-Name.
Move 'X' to Opt_List-Options-Eq.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
Clear Opt_List.
Move 'NOINTERVLS' to Opt_List-Name.
Move 'X' to: Opt_List-Options-CP,
Opt_List-Options-EQ,
Opt_List-Options-GE,
Opt_List-Options-GT,
Opt_List-Options-LE,
Opt_List-Options-LT,
Opt_List-Options-NE,
Opt_List-Options-NP.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
Clear Opt_List.
Clear Assrtd.
Move: 'B' to Assrtd-Kind,
'EMAILN' to Assrtd-Name,
'I' to Assrtd-SG_Main,
'N' to Assrtd-SG_Addy,
'JUST_EQ' to Assrtd-Op_Main,
'NOINTERVLS' TO Assrtd-OP_ADDY.
APPEND Assrtd TO RESTRICT-***_TAB.
Call function module
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
RESTRICTION = RESTRICT
DB = ' '
EXCEPTIONS
TOO_LATE = 1
REPEATED = 2
NOT_DURING_SUBMIT = 3
DB_CALL_AFTER_REPORT_CALL = 4
SELOPT_WITHOUT_OPTIONS = 5
SELOPT_WITHOUT_SIGNS = 6
INVALID_SIGN = 7
REPORT_CALL_AFTER_DB_ERROR = 8
EMPTY_OPTION_LIST = 9
INVALID_KIND = 10
REPEATED_KIND_A = 11
OTHERS = 12.
Exception handling
IF SY-SUBRC NE 0.
ENDIF.
Use same form for all three fields. Update all fields every time.
At Selection-Screen on Value-Request for GnrlF-Low.
Perform GetFillUserInfo Tables GnrlF GnrlL GnrlSpMl.
At Selection-Screen on Value-Request for GnrlL-Low.
Perform GetFillUserInfo Tables GnrlF GnrlL GnrlSpMl.
At Selection-Screen on Value-Request for GnrlSpMl-Low.
Perform GetFillUserInfo Tables GnrlF GnrlL GnrlSpMl.
Start-of-Selection.
Try.
Some regular report code goes here.
Catch CX_ROOT.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
Exit.
EndTry.
End-of-Selection.
*=============================================================================================
*| Form GetFillUserInfo |
*| Get all user information from SAP tables and fill out Selection-Screen tables. |
*| Fill in all fields for user. |
*=============================================================================================
Form GetFillUserInfo Tables NameF Type Standard Table NameL Type Standard Table
SAPIds Type Standard Table.
Data: NameFLoc Type Range of User_Addrs-Name_First with header line,
NameLLoc Type Range of User_Addrs-Name_Last with header line,
OutlookLoc Type Range of ZXX_Hrid-ZZ_EMail_Address with header line,
SAPIdLoc Type Range of User_Addrs-BName with header line.
data: step_line like sy-stepl.
Types: Begin of UsrAddrsT.
Types: BNAME Like User_Addrs-BName,
NAME_LAST Like User_Addrs-Name_Last,
NAME_FIRST Like User_Addrs-Name_First,
NAME_TEXT Like User_Addrs-Name_Text,
DEPARTMENT Like User_Addrs-Department.
Types: End of UsrAddrsT.
Data: UsrAddrsInt type standard table of UsrAddrsT with header line.
Types: Begin of UsrAddrsT2.
Types: Value(80) Type C.
Types: End of UsrAddrsT2.
Data: UsrAddrs type standard table of UsrAddrsT2 with header line.
Data: Field_Tab type standard table of DFIES with header line.
DATA: Return_Tab Type Standard table of ddshretval with HEADER LINE.
Data: RtField Like DFIES-FIELDNAME,
WinTitle(40) Type C.
Generic F4 tables
Data: OutField_Tab Type Standard table of DFIES with header line,
OutUsrAddrs Type Standard table of UsrAddrsT2 with header line.
Data: l_prog like syst-cprog,
l_screen like syst-dynnr,
specifichlpfld like Help_Info-Dynprofld.
Data: TblSz Type I.
l_prog = syst-cprog.
l_screen = syst-dynnr.
Select D2BName D2Name_First D2NAME_LAST D2Name_Text D2~Department
From ( Usr21 as D1
Inner Join User_Addrs as D2
On D1BName = D2BName )
Appending Corresponding fields of table UsrAddrsInt
Where D2~BName <> Space.
Sort UsrAddrsInt by Name_Last Name_First BName.
Delete UsrAddrsInt Where BName cs 'n/a' or ( BName = 'Z_USER' and Name_Text cs 'USER SAMPLE' ) or BName = 'SAMPLE'.
Fill value table- one column data per row.
Loop at UsrAddrsInt.
If UsrAddrsInt-BName <> Space.
Write UsrAddrsInt-BName to Usraddrs-Value.
Else.
Write space to UsrAddrs-Value.
Endif.
Append UsrAddrs.
If UsrAddrsInt-NAME_TEXT <> Space.
Write UsrAddrsInt-NAME_TEXT to Usraddrs-Value.
Else.
Write space to UsrAddrs-Value.
Endif.
Append UsrAddrs.
If UsrAddrsInt-DEPARTMENT <> Space.
Write UsrAddrsInt-DEPARTMENT to Usraddrs-Value.
Else.
Write space to UsrAddrs-Value.
Endif.
Append UsrAddrs.
EndLoop.
Select Distinct d1tabname D1fieldname D1Domname d1Datatype D1~position
D1rollname D1inttype D1intlen D1leng D1Decimals D1outputLen
From DD03M as D1
appending corresponding fields of table Field_tab
where
DDLanguage = Syst-Langu and
d1~tabname = 'USER_ADDRS' and
D1~fieldname in ('BNAME', 'NAME_TEXT', 'DEPARTMENT').
Sort Field_Tab by position.
Loop at Field_Tab.
Select Single DDText
Into Field_Tab-FieldText
From DD03M
Where Tabname = Field_Tab-Tabname and
FieldName = Field_Tab-fieldName and
DDLanguage = Syst-Langu.
If Syst-Subrc = 0.
Modify Field_Tab.
Endif.
EndLoop.
RtField = 'BNAME'.
WinTitle = 'Find Person(s) for SAP E-Mail'.
specifichlpfld = 'USR21-BNAME'.
Clear: OutField_Tab, OutUsrAddrs. Refresh: OutField_Tab, OutUsrAddrs.
OutField_Tab[] = Field_Tab[].
OutUsrAddrs[] = UsrAddrs[].
Call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = RtField
stepL = Step_Line
dynpprog = l_prog " sy-cprog
dynpnr = l_screen " sy-dynnr
dynprofield = specifichlpfld
Value_org = 'C' "'S'
WINDOW_TITLE = WinTitle
MULTIPLE_CHOICE = 'X'
TABLES
field_Tab = OutField_Tab
value_tab = OutUsrAddrs "SelFNames
RETURN_TAB = RETURN_TAB.
If SY-SUBRC <> 0.
If Syst-Batch = ' '. " Online
Sy-MsgTy = 'I'.
Else.
Sy-MsgTy = 'E'.
Endif.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
If Syst-Batch = ' '. " Online
Raise Exception Type CX_RPTERR_EXCEPTION.
Endif.
Endif.
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
POVSTEPL = Step_Line
EXCEPTIONS
STEPL_NOT_FOUND = 1
OTHERS = 2.
If SY-SUBRC <> 0.
If Syst-Batch = ' '. " Online
Sy-MsgTy = 'I'.
Else.
Sy-MsgTy = 'E'.
Endif.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
If Syst-Batch = ' '. " Online
Raise Exception Type CX_RPTERR_EXCEPTION.
Endif.
Endif.
Loop at Return_Tab.
Clear UsrAddrsInt.
Read table UsrAddrsInt with key BName = Return_Tab-FIELDVAL.
If Syst-Subrc = 0.
NameFLoc-Low = UsrAddrsInt-Name_First. " should be ok if blank- append anyway.
NameLLoc-Low = UsrAddrsInt-Name_Last.
sapIdLoc-Low = UsrAddrsInt-BName.
Append: NameFLoc, NameLLoc, SapIdLoc.
Clear: NameFLoc, NameLLoc, SapIdLoc.
Endif.
EndLoop.
Loop at NameFLoc.
NameFLoc-High = space. NameFLoc-Sign = 'I'. NameFLoc-Option = 'EQ'. Modify NameFLoc.
EndLoop.
Loop at NameLLoc.
NameLLoc-High = space. NameLLoc-Sign = 'I'. NameLLoc-Option = 'EQ'. Modify NameLLoc.
EndLoop.
Loop at SapIdLoc.
SapIdLoc-High = space. SapIdLoc-Sign = 'I'. SapIdLoc-Option = 'EQ'. Modify SapIdLoc.
EndLoop.
Loop at NameFLoc.
Move-Corresponding NameFLoc to NameF.
Append NameF.
Add 1 to TblSz.
EndLoop.
Refresh NameFLoc. Clear: NameF, NameFLoc.
Loop at NameLLoc.
Move-Corresponding NameLLoc to NameL.
Append NameL.
EndLoop.
Refresh NameLLoc. Clear: NameL, NameLLoc.
Loop at SapIdLoc.
Move-Corresponding SapIdLoc to SAPIds.
Append SapIds.
EndLoop.
Refresh SapIdLoc. Clear: SapIds, SapIdLoc.
EndForm. " GetFillUserInfo -
I am building an internal table and displaying it as search help using F4IF_INT_TABLE_VALUE_REQUEST. How can I tell what line was selected from the search help? Only one field is filled with the selection, but there are several other fields attached to this that I need in my program - but I can't tell which line was selected, and the one field is not enough information to use to get the record from the internal table.
Hi,
RETURN_TAB would have the selected values.
FIELD_TAB will have the hit list fields.
DYNPFLD_MAPPING will have the Assignment of the screen fields to the internal table.
Regards, -
Hi everybody,
I need to use F4IF_INT_TABLE_VALUE_REQUEST FM because I have to let users select an specific option before choosing another value. The point is that I need to save in a program global variable what the user selects, and decide something with it in the program.
Is it possible that F4IF_INT_TABLE_VALUE_REQUEST FM returns the value in a sinple variable or it has to be paramter?
I look in a lot of previous threads but I didn't find anything, and I don't know if it's possible.
Thanks and kind regards,
MMP.Hi,
Sure you can. All you need to do is to store what the function returns in your global variable. It don't need to be returned back to screen field.
DATA: BEGIN OF VALUES OCCURS 0,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
END OF VALUES.
DATA: VALUES_TAB TYPE TABLE OF VALUES,
G_VALUE TYPE SPFLI-CONNID. "global variable to store what is returned
"in PAI first populate your table
SELECT CARRID CONNID
FROM SPFLI
INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB
UP TO 10 ROWS.
"then call the function but don't return the value to screen field
"If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the useru2019s selection is
"returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the
"selection is returned into the table instead.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'CONNID'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = VALUES_TAB
RETURN_TAB = RETURN_TAB.
"now simply read first row of return tab and store the value returned there in some global var
READ RETURN_TAB INDEX 1.
MOVE RETURN_TAB-FIELDVAL TO G_VALUE.
Regards
Marcin -
F4IF_INT_TABLE_VALUE_REQUEST- how to add Maximum No. of hits
Hi Experts,
I am using F4IF_INT_TABLE_VALUE_REQUEST. Can someone please help me. I am getting 2,100 hits I need to limit it to 500 hits. There is no Maximum number of hits when you click the Downward pointing arrow above the toolbar. How can I add the field for maximum number of hits just like in the standard F4 help function.
Thanks!Dispay the source code of this function module in Se37.. you will notice that the following is commented out..
CALLCONTROL-MAXRECORDS = 500.
deleteing lines in your program is probably the only option..
ie
data w_lines type i.
w_lines = lines( itab ).
delete itab from 201 to w_lines.
~Suresh -
'F4IF_INT_TABLE_VALUE_REQUEST' how to display description
Hi All,
I'm showing such help using 'F4IF_INT_TABLE_VALUE_REQUEST'
TYPE
RE
KR
TY
Now the requiremnt is to show description also along with that like :
TYPE Description
RE Invoice-xyz
KR Invoice-abc
TY Invoice-pqr
Below is my code :
value_tab-name = 'RE'.
append value_tab.
value_tab-name = 'KG'.
append value_tab.
field_tab-fieldname = 'BLART'.
field_tab-tabname = 'BSAK'.
append field_tab.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = field_tab-fieldname
tables
value_tab = value_tab
field_tab = field_tab
return_tab = return_tab
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
Kindly help how can I achieve this.Hi All,
This is my complete code :
select-options : s_blart FOR bsak-blart.
DATA: BEGIN OF value_tab OCCURS 0,
name TYPE bsak-blart,
des TYPE makt-maktx,
END OF value_tab.
DATA :field_tab LIKE dfies OCCURS 0 WITH HEADER LINE.
field_tab-fieldname = 'BLART'.
field_tab-tabname = 'BSAK'.
APPEND field_tab.
value_tab-name = 'XG'.
value_tab-des = 'desc'.
APPEND value_tab.
value_tab-name = 'YT'.
value_tab-des = 'abc'.
APPEND value_tab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BLART'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_BLART'
* window_title = 'Document Types'
value_org = 'S'
TABLES
value_tab = value_tab
field_tab = field_tab
return_tab = return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc = 0.
s_blart-low = return_tab-fieldval.
ENDIF.
For this code help is displayed with no values.
Kindly suggest what changes need to be made now. -
'F4IF_INT_TABLE_VALUE_REQUEST' doest not show any list for selection
hi sapiens ....
i hav an issue ... i used a parameter for which F4 help was assigned using
'F4IF_INT_TABLE_VALUE_REQUEST' .... to this an internal table any return fields was given .. if v press F4 window is opening for seletion but no values in it ....
plz do .. giv u r suggestion ....
Report ZJA_TEST .
parameters filepath(100) type c .
at selection-screen on VALUE-REQUEST FOR filepath .
types : begin of typ_filepath ,
name(10),
end of typ_filepath .
data : it_filepath type table of typ_filepath ,
wa_filepath type typ_filepath .
wa_filepath-name = 'temp'.
append wa_filepath to it_filepath .
wa_filepath-name = 'source'.
append wa_filepath to it_filepath .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'NAME'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'FILEPATH'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = it_filepath
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.check with following code..
DATA: l_option TYPE help_info-dynprofld,
v_repid LIKE sy-repid.
DATA: ls_dfies TYPE dfies,
lt_dfies TYPE ddfields.
l_option = 'p_action'.
v_repid = sy-repid.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = 'DD30T'
fieldname = 'DDTEXT'
LANGU = SY-LANGU
LFIELDNAME = ' '
ALL_TYPES = ' '
GROUP_NAMES = ' '
UCLEN =
IMPORTING
X030L_WA =
DDOBJTYPE =
dfies_wa =
LINES_DESCR =
TABLES
dfies_tab = lt_dfies
FIXED_VALUES =
EXCEPTIONS
not_found = 1
internal_error = 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.
READ TABLE lt_dfies INTO ls_dfies INDEX 1.
ls_dfies-offset = 0.
MODIFY lt_dfies FROM ls_dfies INDEX 1.
ls_dfies-fieldname = 'ACTION_VALUE'.
ls_dfies-scrtext_s = 'ActionValue'.
ls_dfies-scrtext_m = 'ActionValue'.
ls_dfies-scrtext_l = 'ActionValue'.
ls_dfies-intlen = 40.
ls_dfies-leng = 40.
ls_dfies-outputlen = 20.
INSERT ls_dfies INTO lt_dfies INDEX 1.
**This function is called to provide the input help for the user.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ACTION_VALUE'
dynpprog = v_repid
dynpnr = sy-dynnr
dynprofield = l_option
window_title = 'Select Action Value'
value_org = 'S'
display = ' '
TABLES
value_tab = it_action_values
field_tab = lt_dfies
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
if sy-subrc = 0.
endif.
it will work...
Thanks & Regards
Raju Mummidi -
Help required in F4IF_INT_TABLE_VALUE_REQUEST
hi all,
I am using F4IF_INT_TABLE_VALUE_REQUEST function for F4 list , below is the code im using,
DATA : zmatnr TYPE zauvvselscr-matnr.
DATA: w_choice TYPE sy-tabix.
DATA: BEGIN OF i_values OCCURS 0,
werks TYPE zauvvselscr-werks,
matnr TYPE zauvvselscr-matnr,
maktx TYPE zauvvselscr-maktx,
j_3asean TYPE zauvvselscr-j_3asean,
/afs/collection TYPE zauvvselscr-/afs/collection,
mvgr5 TYPE zauvvselscr-mvgr5,
stock TYPE zauvvselscr-clabs,
END OF i_values.
DATA: screen_values TYPE TABLE OF dynpread ,
screen_value LIKE LINE OF screen_values.
DATA: lv_srch_str TYPE c LENGTH 20.
DATA: it_ret LIKE ddshretval OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF fieldtab_rt OCCURS 20.
INCLUDE STRUCTURE dfies. "field for ddif_fieldinfo_get
DATA: END OF fieldtab_rt.
DATA: dyn_tab TYPE TABLE OF dselc,
S_DYN TYPE DSELC.
s_dyn-fldname = 'MATNR'.
s_dyn-dyfldname = 'P_MATNR'.
APPEND s_dyn TO dyn_tab.
s_dyn-fldname = 'WERKS'.
s_dyn-dyfldname = 'P_WERKS'.
APPEND s_dyn TO dyn_tab.
fieldtab_rt-tabname = zauvvselscr.
fieldtab_rt-fieldname = 'MATNR'.
fieldtab_rt-position = '0001'.
APPEND fieldtab_rt.
fieldtab_rt-tabname = zauvvselscr.
fieldtab_rt-fieldname = 'WERKS'.
fieldtab_rt-position = '0002'.
APPEND fieldtab_rt.
screen_value-fieldname = 'ZMATNR' . " Field to be read
APPEND screen_value TO screen_values. "* Fill the table
REFRESH it_ret.
REFRESH fieldtab_rt.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = screen_values.
READ TABLE screen_values INDEX 1 INTO screen_value.
REPLACE ALL OCCURRENCES OF '*' IN screen_value-fieldvalue WITH space.
CONCATENATE screen_value-fieldvalue '%' INTO lv_srch_str.
REFRESH i_values.
CLEAR i_values.
SELECT DISTINCT matnr werks maktx j_3asean /afs/collection mvgr5 SUM( clabs ) AS stock
INTO CORRESPONDING FIELDS OF i_values FROM zauvvselscr WHERE matnr LIKE lv_srch_str
GROUP BY matnr werks maktx j_3asean /afs/collection mvgr5.
APPEND i_values.
ENDSELECT.
DELETE ADJACENT DUPLICATES FROM i_values.
SORT i_values BY matnr werks.
*&&--passing the above selected records to the selection
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
value_org = 'S'
TABLES
value_tab = i_values[]
field_tab = fieldtab_rt
return_tab = it_ret
dynpfld_mapping = dyn_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
LOOP AT it_ret.
screen_value-fieldvalue = it_ret-fieldval.
MOVE it_ret-fieldval TO zmatnr.
ENDLOOP.
ENDIF.
My requirement is , In my selection screen i have field ZMATNR , with the above coding i can get the selected MATNR into that, but in addition to the selected matnr i need to get the corresponding WERKS also, which needs to be passed to another variable for further usage, I tried various methods of using "dynpfld_mapping " field tab etc, but nowhere im getting the WERKS value, i dont know whether im doing it correctly. so kindly suggest me to achieve the requirement.
thanks and regs,
RajaHi,
its possible check the below code.
parameters: p_matnr type mara-matnr,
p_werks type marc-werks.
data: i_mara type table of mara with header line,
i_marc type table of marc with header line,
i_dselc type table of dselc with header line,
i_dfies type table of dfies with header line,
v_werks type marc-werks.
at selection-screen on value-request for p_matnr.
select * from marc into table i_marc up to 10 rows where matnr is not null.
i_dfies-tabname = 'MARA'.
i_dfies-fieldname = 'MATNR'.
append i_dfies.
clear i_dfies.
i_dfies-tabname = 'MARC'.
i_dfies-fieldname = 'WERKS'.
append i_dfies.
clear i_dfies.
i_dselc-fldname = 'WERKS'.
i_dselc-fldinh = v_werks.
i_dselc-dyfldname = 'P_WERKS'.
append i_dselc.
clear i_dselc.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
DDIC_STRUCTURE = ' '
retfield = 'MATNR'
PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_MATNR'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = i_marc[]
field_tab = i_dfies[]
RETURN_TAB =
dynpfld_mapping = i_dselc[]
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.
Regards,
Sathish Reddy. -
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 -
How Can I get multi column values from dynamic search help?
Hi Gurus;
I'm using dynamic search help in my program.
I want to get multi column values from search help. But I dont know solution for this issue.
I'm using F4IF_INT_TABLE_VALUE_REQUEST FM.
How Can I get multi column values from dynamic search help?
Thanks.Believe it or not, the same FM worked for me in a dynpro. I will try to explain here how it works in custom screen and then you can do your work for other screens or program types. I am not going to write my actual work but will explain in general.
I have 4 fields (FLD1, FLD2, FLD3, FLD4) and i made the search based on FLD2 and when user click on a line (could be any field), then this would bring the line on to the screens.
There are like 3 steps.
You have your value_tab for my fields FLD1, FLD2, FLD3 and FLD4. This is just the data that we pass into the FM. (data: IT_VALTAB type table of ZVAL_TABLE)
Next map the screen fields into an internal table (data: It_dynpfld type table of dselc ). I also have other internal tables defined (just to keep it straight, i will be putting here) data: It_return type standard table of ddshretval.
Next step is to call the function module. Make sure you have values in IT_VALTAB.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'FLD2'
value_org = 'S'
tables
value_tab = It_VALTAB
return_tab = It_return
dynpfld_mapping = It_dynpfld
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.
else.
perform get_selected_fields tables It_return.
endif.
The code within the perform GET_SELECTED_FIELDS - We need to map the result fields after user selects it. The code goes like this. This is step is to update the dynpro fields.
I need a internal table as well as a work area here. like,
data: lt_fields type table of dynpread,
la_fields type dynpread.
field-symbols: <fs_return> type ddshretval.
so fill out LT_FIELDS from the IT_RETURN table
loop at lt_return assigning <fs_return>.
la_fields-fieldname = <fs_return>-retfield.
la_fields-fieldvalue = <fs_return>-fieldval.
append la_fields to lt_fields.
clear: la_fields.
endloop.
Call the FM to update the dynpro
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-repid
dynumb = '1002' "This is my screen number. You could use 1000 for selection screen (hope so)
tables
dynpfields = lt_fields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
good luck
Maybe you are looking for
-
Why my iPhone contacts, in groups, shows "my Mac" and "iCloud"?
I had configured both my iPhone and my Mac Mini to sync with iCloud. But in both contacts, there are two main groups: The first one is "From My Mac" and the second one is "iCloud". All groups that i created (friends, family, work, etc...) appears to
-
After turning on iMAC the sign in page comes up and accept my password. It then goes to a page with a background pictures but nothing else. If I leave it there it eventually fades and shows the clock. How to I get it to open from there?
-
Here is the problem I want to change one item height in multiple records block.. I tried to do the following set_item_instance_property(:system.mouse_item,:system.current_record,height,50); But this didn't work as the property for height couldn't be
-
Cannot add column to flexible table when ddl autocommit is off using Procedure
Hello All, Through procedure I am trying to insert data into the target(EX_92) table(with schema flexibility) Source table data ID PRODUCT_CODE PRODUCT_NAME PRICE COLOR TYPE 1 1 rugg 101.22 2 1 rugg 101.22 3 2 book 200.32 BLUE Y Target table QUERY dr
-
Plug-in without Menuitem/Tool-button
Hi, I want to implement a plug-in for which i don't want to add any Menu/toolbutton, but when the acrobat is launched it has to perform the operation which i assign to the plug-in(say, if i set a different action to a mouseclick for a link). Is it po