CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
cucol = 0
Curow = 0
IMPORTING
select_value = select_value
TABLES
fields = help_fields
valuetab = itab_valuetab
EXCEPTIONS
field_not_in_ddic = 1
more_then_one_selectfield = 2
no_selectfield = 3
OTHERS = 4.
to
CALL FUNCTION 'F4TOOL_F4FUNCTION_BRIDGE'
EXPORTING
CUCOL = 0
CUROW = 0
tabname = 'ZUSR_LE_STR'
fieldname = 'TM1_ID'
display_only = ' '
IMPORTING
SELECTED_VALUE = select_value
TABLES
VALUE_TAB = itab_valuetab
FIELDS_TAB = help_fields
.
ANOTHER METHOD WITH EXAMPLE
DATA: BEGIN OF fieldtab OCCURS 2.
* INCLUDE STRUCTURE help_value. " - NON UNICODE
include structure dfies. " +UNICODE
DATA: END OF fieldtab.FORM choose_ausngr.
DATA: BEGIN OF fieldtab OCCURS 2.
* INCLUDE STRUCTURE help_value. " -MC20100803
include structure dfies. " +MC20100803
DATA: END OF fieldtab.
DATA: l_selgp LIKE t458a-selgp,
l_lines LIKE sy-tabix.
DATA: BEGIN OF werte_augr OCCURS 10,
text(100),
END OF werte_augr.
CLEAR fieldtab.
REFRESH fieldtab.
*--> Leiste der BezugsFIELDTAB
fieldtab-tabname = 'T458A'.
fieldtab-fieldname = 'SELGP'.
* fieldtab-selectflag = 'X'. " -MC20100803 " sTRUCTURE CHANGED
APPEND fieldtab.
* CLEAR fieldtab-selectflag. " -MC20100803
fieldtab-tabname = 'T458A'.
fieldtab-fieldname = 'AUSKT'.
* fieldtab-selectflag = 'X'. " -MC20100803
APPEND fieldtab.
* CLEAR fieldtab-selectflag. " -MC20100803
fieldtab-tabname = 'T458B'.
fieldtab-fieldname = 'AUSLT'.
APPEND fieldtab.
*-> Wertetabelle versorgen
CLEAR l_selgp.
DESCRIBE TABLE werte_augr LINES l_lines.
IF l_lines LE 0.
SELECT * FROM t458a ORDER BY selgp auskt.
*----> Nr. der Ausnahmegruppe
IF t458a-selgp EQ l_selgp.
*------> Um FBaustein HELP_VALUES_GET_WITH_TABLE auszutricksen
werte_augr = ' '.
ELSE.
*------> Leerzeile (außer am Anfang)
IF NOT l_selgp IS INITIAL.
CLEAR werte_augr.
APPEND werte_augr. APPEND werte_augr. APPEND werte_augr.
ENDIF.
werte_augr = t458a-selgp.
ENDIF.
APPEND werte_augr.
*----> Nr. der Ausnahmemeldung
werte_augr = t458a-auskt.
APPEND werte_augr.
*----> Text zur Ausnahmemeldung
SELECT SINGLE * FROM t458b
WHERE spras = sy-langu
AND aussl = t458a-aussl.
IF sy-subrc EQ 0.
werte_augr = t458b-auslt.
ELSE.
CLEAR werte_augr.
ENDIF.
APPEND werte_augr.
l_selgp = t458a-selgp.
ENDSELECT.
ENDIF.
l_selgp = 1.
READ TABLE werte_augr INDEX 1.
*
* MC20100803 START OF DELETION - PANAYA ID : 606
*
** CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
** EXPORTING
** fieldname = 'AUSKT'
** tabname = 'T458A'
** IMPORTING
** select_value = so_auskt-low
** TABLES
** fields = fieldtab
** valuetab = werte_augr
** EXCEPTIONS
** field_not_in_ddic = 0
** more_then_one_selectfield = 0
** no_selectfield = 0.
*
*
DATA : BEGIN OF X_RETURN OCCURS 0.
INCLUDE STRUCTURE DDSHRETVAL.
DATA : END OF X_RETURN.CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
RETFIELD = 'AUSKT'
* PVALKEY = ' '
* DYNPPROG = ' '
* DYNPNR = ' '
DYNPROFIELD = 'T458A'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
* VALUE_ORG = 'C'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
VALUE_TAB = werte_augr
FIELD_TAB = fieldtab
RETURN_TAB = X_RETURN
* DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
LOOP AT X_RETURN.
MOVE X_RETURN-FIELDVAL TO so_auskt-LOW.
ENDLOOP.
*
Search This Blog
Wednesday, August 4, 2010
RFC CALL TRANSACTION
FROM
**
CALL FUNCTION 'RFC_CALL_TRANSACTION' DESTINATION dest
EXPORTING
trancode = trancode
updmode = 'X'
IMPORTING
messg = i_messg
TABLES
bdctable = i_bdctable.
TO
CALL FUNCTION 'RFC_CALL_TRANSACTION_USING' DESTINATION DEST
EXPORTING
TCODE = TRANCODE
MODE = 'N'
TABLES
BT_DATA = I_BDCDTABLE
L_ERRORS = i_messg
EXCEPTIONS
AUTHORITY_NOT_AVAILABLE = 1
OTHERS = 2
.
trancode = 'ZSUD_UPDATE_LE'.
updmode = 'X'.
**
CALL FUNCTION 'RFC_CALL_TRANSACTION' DESTINATION dest
EXPORTING
trancode = trancode
updmode = 'X'
IMPORTING
messg = i_messg
TABLES
bdctable = i_bdctable.
TO
CALL FUNCTION 'RFC_CALL_TRANSACTION_USING' DESTINATION DEST
EXPORTING
TCODE = TRANCODE
MODE = 'N'
TABLES
BT_DATA = I_BDCDTABLE
L_ERRORS = i_messg
EXCEPTIONS
AUTHORITY_NOT_AVAILABLE = 1
OTHERS = 2
.
trancode = 'ZSUD_UPDATE_LE'.
updmode = 'X'.
Monday, July 19, 2010
HELP_VALUES_GET_WITH_TABLE
from
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
cucol = 0
curow = 0
IMPORTING
select_value = select_value
TABLES
fields = help_fields
valuetab = itab_valuetab
EXCEPTIONS
field_not_in_ddic = 1
more_then_one_selectfield = 2
no_selectfield = 3
OTHERS = 4.
to
CALL FUNCTION 'F4TOOL_F4FUNCTION_BRIDGE'
EXPORTING
CUCOL = 0
CUROW = 0
tabname = 'ZUSR_LE_STR' "NK20091016
fieldname = 'TM1_ID' "NK20091016
display_only = ' ' "NK20091016
* NO_CONVERSION = ' '
* WINDOW_TITLE =
* TABDISPLAY = ' '
IMPORTING
SELECTED_VALUE = select_value
* SELECTED_INDEX =
TABLES
* SHVALUE_TAB =
* SHSTRUC_TAB =
VALUE_TAB = itab_valuetab
FIELDS_TAB = help_fields
* VALUES_OUT =
* COLTITLE_TAB =
* SEL_OPT =
.
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
cucol = 0
curow = 0
IMPORTING
select_value = select_value
TABLES
fields = help_fields
valuetab = itab_valuetab
EXCEPTIONS
field_not_in_ddic = 1
more_then_one_selectfield = 2
no_selectfield = 3
OTHERS = 4.
to
CALL FUNCTION 'F4TOOL_F4FUNCTION_BRIDGE'
EXPORTING
CUCOL = 0
CUROW = 0
tabname = 'ZUSR_LE_STR' "NK20091016
fieldname = 'TM1_ID' "NK20091016
display_only = ' ' "NK20091016
* NO_CONVERSION = ' '
* WINDOW_TITLE =
* TABDISPLAY = ' '
IMPORTING
SELECTED_VALUE = select_value
* SELECTED_INDEX =
TABLES
* SHVALUE_TAB =
* SHSTRUC_TAB =
VALUE_TAB = itab_valuetab
FIELDS_TAB = help_fields
* VALUES_OUT =
* COLTITLE_TAB =
* SEL_OPT =
.
Subscribe to:
Posts (Atom)