PO function code for HOLD & CANCEL (DELETE or BLOCKED) button
Hi,
can any one can provide the function code for HOLD button in purchase order creation.
How to find out the function code for HOLD button.
Regards,
Nagaraju.
For your case specifically, function code for hold is dependent on that program is calling it, but any way for hold, you can simply use HOLD or RECN or ONHO or PTBK or a bunch of others.
For block you can use SHB1 or SHB2 or VFIX etc. To make it easy for you and others, follow the following steps:
-Run transaction SHDB and record the transaction you want.
-Then in a different session, run SE16 and enter table name RSMPTEXTS.
-Enter any OK Code you want to know its use in the field OBJ_CODE (Function Code) and execute.
-If you know the program name or Tcode, you can use that too. Just enter that in the appropriate field.
-OR use the text wildcard and see if you're lucky.
-The Text will tell you what the OK Code does.
Ken G
Similar Messages
-
Function code for execute button
Hi,
I have a requirement like this...
there is a program for selective deletion from a data target by a transaction called delete_facts.
this generates a program for selective deletion. when i run this report there comes one screen asks for selections fields and then again excute it then deletion will happen.
But this program i need to modify for certain default values so as to avoid entering of the values in the selection screen.
i will use default value this will solve my 1st purpose but since this program has to be scheduled from process chain, the 2nd execute funtionality( once the values appear in the screen) shud be automated.
can anybody tell me how to do this that is after program runs values will be passed to selection screen and selection screen shud not be shown and execute shud happen automatically.
this is the code generated by transaction delete_facts:
*& Report ZTEST_DELETE1
REPORT ZTEST_DELETE1.
generated Header from i_sel_repid
generated REPORT (RSDRD)
(should be deleted after use)
Generated by..: SALAGUN
Date/Time.....: 20070322 / 051426
*REPORT GP457FUV92GJS4663HYHXLYC9Q7 .
generated Tables from i_t_tables
and i_datatarget
TABLES:
SSCRFIELDS,
/BIC/SZTESTBC
,/BI0/SCHNGID
,/BI0/SRECORDTP
,/BI0/SREQUID
,/BI0/SDATE
,/BI0/SUNIT
generated DATA/TYPES
TYPE-POOLS: RSDRD, RSDQ.
DATA:
L_INTERACTIVE TYPE RS_BOOL,
L_ANSWER(1) TYPE C,
L_TYPE(1) TYPE C,
L_PARALLEL TYPE I,
L_NO_OF_ROWS TYPE I,
L_NO_OF_ROWS_C(10) TYPE C,
L_TITEL TYPE RS_CHAR72,
L_TEXT1 TYPE RS_CHAR72,
L_TEXT2 TYPE RS_CHAR72,
L_S_RANGE TYPE RSDRD_S_RANGE,
L_S_SELTXT TYPE RSDQ_S_SELTEXT,
L_SX_SEL TYPE RSDRD_SX_SEL,
L_T_MSG TYPE RS_T_MSG,
L_THX_SEL TYPE RSDRD_THX_SEL,
L_T_SELTXTS TYPE RSDQ_T_SELTEXT
WITH HEADER LINE.
generated SELECTION-SCREEN from i_t_selscr
SELECTION-SCREEN BEGIN OF BLOCK B001 WITH FRAME TITLE T001 .
SELECT-OPTIONS C001 FOR /BIC/SZTESTBC-/BIC/ZTESTBC
default 'D' TO 'C'.
SELECTION-SCREEN END OF BLOCK B001 .
SELECTION-SCREEN BEGIN OF BLOCK B002 WITH FRAME TITLE T002 .
SELECT-OPTIONS C002 FOR /BI0/SCHNGID-SID .
SELECT-OPTIONS C003 FOR /BI0/SRECORDTP-SID .
SELECT-OPTIONS C004 FOR /BI0/SREQUID-SID .
SELECTION-SCREEN END OF BLOCK B002 .
SELECTION-SCREEN BEGIN OF BLOCK B003 WITH FRAME TITLE T003 .
SELECT-OPTIONS C005 FOR /BI0/SDATE-DATE0 .
SELECTION-SCREEN END OF BLOCK B003 .
SELECTION-SCREEN BEGIN OF BLOCK B004 WITH FRAME TITLE T004 .
SELECT-OPTIONS C006 FOR /BI0/SUNIT-UNIT .
SELECTION-SCREEN END OF BLOCK B004 .
SELECTION-SCREEN BEGIN OF BLOCK B005 WITH FRAME TITLE T005 .
PARAMETERS L_PA TYPE DBMAN_PARALLEL_DEGREE DEFAULT '01'.
DATA L_P1(1) TYPE C.
PARAMETERS L_NL TYPE DBMAN_NO_LOGGING AS CHECKBOX DEFAULT ' '.
PARAMETERS L_SR TYPE DBMAN_SHOW_REPORT AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK B005 .
generated body from i_t_body
generated INITIALIZATION from i_t_init
and i_t_seltexts
and i_batch_allowed
and i_datatarget
INITIALIZATION.
T001 = 'product'.
T002 = 'Data Package'.
T003 = 'Time'.
T004 = 'Unit'.
T005 = 'Options'.
SELECTION-SCREEN FUNCTION KEY 1.
MOVE 'Execute in Bckgrnd' TO SSCRFIELDS-FUNCTXT_01.
PERFORM RESTRICT_SEL_OPTIONS(SAPLRSDRD).
SET TITLEBAR 'SELECTION' OF PROGRAM 'SAPLRSDRD' WITH
' Delete selected entries from the data target DELETE '.
L_S_SELTXT-NAME = 'C001'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Base Code'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C002'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Change Run ID (SID)'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C003'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Record type (SID)'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C004'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Request ID (SID)'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C005'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Calendar Day'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C006'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Unit of measure'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'L_PA'.
L_S_SELTXT-KIND = 'P'.
L_S_SELTXT-TEXT = 'Parall. deg. during reconstruc'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'L_NL'.
L_S_SELTXT-KIND = 'P'.
L_S_SELTXT-TEXT = 'Switch off logging drng recons'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'L_SR'.
L_S_SELTXT-KIND = 'P'.
L_S_SELTXT-TEXT = 'Display generated report'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
generated AT SELECTION-SCREEN OUTPUT from i_sel_repid
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
EXPORTING
PROGRAM = 'GP457FUV92GJS4663HYHXLYC9Q7'
TABLES
SELTEXTS = L_T_SELTXTS
EXCEPTIONS
PROGRAM_NOT_FOUND = 1
PROGRAM_CANNOT_BE_GENERATED = 2
OTHERS = 3.
generated AT SELECTION-SCREEN
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
WHEN 'ONLI'.
L_INTERACTIVE = RS_C_TRUE.
WHEN 'OPTI'.
WHEN 'DELS'.
WHEN 'FC01'.
L_INTERACTIVE = RS_C_FALSE.
SSCRFIELDS-UCOMM = 'ONLI'.
WHEN 'OTHERS'.
ENDCASE.
generated END-OF-SELECTION from i_t_selopt
and i_del_repid
and i_datatarget
and i_gen_mode
END-OF-SELECTION.
IF NOT C001[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = 'ZTESTBC'.
LOOP AT C001 .
CLEAR L_S_RANGE.
MOVE C001-SIGN TO L_S_RANGE-SIGN.
MOVE C001-OPTION TO L_S_RANGE-OPTION.
MOVE C001-LOW TO L_S_RANGE-LOW.
MOVE C001-HIGH TO L_S_RANGE-HIGH.
MOVE RS_C_TRUE TO L_S_RANGE-KEYFL.
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C002[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0CHNGID'.
LOOP AT C002 .
CLEAR L_S_RANGE.
MOVE C002-SIGN TO L_S_RANGE-SIGN.
MOVE C002-OPTION TO L_S_RANGE-OPTION.
MOVE C002-LOW TO L_S_RANGE-SIDLOW.
MOVE C002-HIGH TO L_S_RANGE-SIDHIGH.
MOVE RS_C_FALSE TO L_S_RANGE-KEYFL.
start change
DESCRIBE FIELD C002-LOW TYPE l_type.
IF l_type = 'I'.
CONDENSE L_S_RANGE-LOW.
CONDENSE L_S_RANGE-HIGH.
ENDIF.
stop change
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C003[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0RECORDTP'.
LOOP AT C003 .
CLEAR L_S_RANGE.
MOVE C003-SIGN TO L_S_RANGE-SIGN.
MOVE C003-OPTION TO L_S_RANGE-OPTION.
MOVE C003-LOW TO L_S_RANGE-SIDLOW.
MOVE C003-HIGH TO L_S_RANGE-SIDHIGH.
MOVE RS_C_FALSE TO L_S_RANGE-KEYFL.
start change
DESCRIBE FIELD C003-LOW TYPE l_type.
IF l_type = 'I'.
CONDENSE L_S_RANGE-LOW.
CONDENSE L_S_RANGE-HIGH.
ENDIF.
stop change
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C004[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0REQUID'.
LOOP AT C004 .
CLEAR L_S_RANGE.
MOVE C004-SIGN TO L_S_RANGE-SIGN.
MOVE C004-OPTION TO L_S_RANGE-OPTION.
MOVE C004-LOW TO L_S_RANGE-SIDLOW.
MOVE C004-HIGH TO L_S_RANGE-SIDHIGH.
MOVE RS_C_FALSE TO L_S_RANGE-KEYFL.
start change
DESCRIBE FIELD C004-LOW TYPE l_type.
IF l_type = 'I'.
CONDENSE L_S_RANGE-LOW.
CONDENSE L_S_RANGE-HIGH.
ENDIF.
stop change
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C005[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0CALDAY'.
LOOP AT C005 .
CLEAR L_S_RANGE.
MOVE C005-SIGN TO L_S_RANGE-SIGN.
MOVE C005-OPTION TO L_S_RANGE-OPTION.
MOVE C005-LOW TO L_S_RANGE-LOW.
MOVE C005-HIGH TO L_S_RANGE-HIGH.
MOVE RS_C_TRUE TO L_S_RANGE-KEYFL.
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C006[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0UNIT'.
LOOP AT C006 .
CLEAR L_S_RANGE.
MOVE C006-SIGN TO L_S_RANGE-SIGN.
MOVE C006-OPTION TO L_S_RANGE-OPTION.
MOVE C006-LOW TO L_S_RANGE-LOW.
MOVE C006-HIGH TO L_S_RANGE-HIGH.
MOVE RS_C_TRUE TO L_S_RANGE-KEYFL.
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
L_PARALLEL = L_PA.
IF L_INTERACTIVE EQ RS_C_TRUE.
CALL FUNCTION 'RSDRD_SEL_DELETION'
EXPORTING
I_DATATARGET = 'DELETE'
I_THX_SEL = L_THX_SEL
I_AUTHORITY_CHECK = RS_C_TRUE
I_NO_LOGGING = L_NL
I_PARALLEL_DEGREE = L_PARALLEL
I_SHOW_REPORT = L_SR
CHANGING
C_T_MSG = L_T_MSG.
ELSE.
CALL FUNCTION 'RSDRD_BUILD_REPORT_FOR_BATCH'
EXPORTING
I_REPID = 'GP457FWJUK1J1F3ZIZZOEH9U533'
I_DATATARGET = 'DELETE'
I_GEN_ONLY = RS_C_FALSE
I_THX_SEL = L_THX_SEL
I_AUTHORITY_CHECK = RS_C_TRUE
I_NO_LOGGING = L_NL
I_PARALLEL_DEGREE = L_PARALLEL
I_SHOW_REPORT = L_SR
CHANGING
C_T_MSG = L_T_MSG.
ENDIF.
Thanks in advance,
Vijayahi!
Function code for execute button is 'ONLI'.
try ur code using it!!
Reward points if it helps.
Regards,
Neha Bansal.
Message was edited by:
Neha Bansal -
How to find function code for buttons on toolbar in oops alv
Hi experts,
I want to remove some buttons from toolbar in oops alv, i know the procedure like get function code and pass the value in a table and pass that table to IT_TOOLBAR_EXCLUDING of
method set_table_for_first_display but I WANT TO KNOW HOW TO FIND FUNCTION CODE FOR BUTTONS ON TOOLBAR IN OOPS ALVHi Prakash,
-->First you have to set the pf status in your alv program by,
{FORM pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'FIRST'.
ENDFORM. "PF_STATUS}
-->Pass this Subroutine name in the Function module, Reuse_alv_grid_display's parameters i.e,
i_callback_pf_status_set = 'PF_STATUS'}
*-->Then doble click on that pf status,
From the menu bar, select Extras->Adjust Template->List Viewer,
This will give you the existing statndard gui status of the program*
->Then catch that function codes in the User command Parameter of the Function module Reuse.. i.e,
i_callback_user_command = 'COMM'
And make a subroutine of the name 'COMM'i.e,
FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
DATA: okcode TYPE sy-ucomm.
okcode = ucomm.
CASE okcode.
WHEN 'REF'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'MANSI'
txt1 = 'CREATED BY'
txt2 = SY-UNAME
TXT3 = ' '
TXT4 = ' '
endcase.
Hope it helps you
Regrds
Mansi -
Hi what is the transaction code for vendor master delete
hi
what is the transaction code for vendor master delete? and customer master delete?
thank u
suryaHi
There won't be any Deleting of customer and vendor completely
we only BLOCK them
FK05 Block Vendor (Accounting)
MK05 Block Vendor (Purchasing)
XK05 Block Vendor (centrally)
FD05 Block Customer (Accounting)
VD05 Customer Block (Sales)
XD05 Block customer (centrally)
<b>Reward points for useful Answers</b>
Regards
Anji -
Function code for notification in a custom scenario
Hi,
Does anyone know the activity code or function code for a notification that needs to be sent to the organiser of a training event if the maximum capacity of the event is exceeded, i.e. the attendee goes on the waiting list.
There seems to be no standard activity type which gets triggered the moment the max. capacity of the training event is exceeded.(unlike BOKP)
Does anyone know the workaround for this ?
As far as I know you cannot create your own activity based on your custom scenario.
Hence how to handle this ?You can use CRM_ORDER_MAINTAIN and populate the parameter IT_SERVICE_OS
or use BAPI_OPPORTUNITY_CHANGEMULTI and populate the parameter SERVICE_OS.
BR,
Florin -
What is the function code for execute
Hi,
What is the function code for execute.
I am using set pf-status under initialization.
Thanks.
Sai.Hi,
If your adding a execute in pf-status then we can give the function code for execute as 'EXEC' - F8.
Nyways it automatically comes no need to explicitly add in pf-status. The standard function code is 'ONLI'
just we need to check the sy-ucomm value and perform what you want.
i.e if sy-ucomm = 'EXEC'.
endif.
hope this help you.
plz reward if useful.
thanks,
dhanashri.
Edited by: Dhanashri Pawar on Jun 26, 2008 11:43 AM -
How to write code for page up and page down buttons on alv screen?
Hi,
Page up and page down buttons are not working in general alv report. Thease buttons are in disable mode. But is stnd. transactions (tcode : fbl5n) these are enabled and working properly, but we can't debug this with /h
How to write code for page up and page down buttons on alv screen?Poonam,
On doing the screen debugging it took me over to Include LSTXWFCC ,kindly check the below code.
module cc_display.
fcode = sy-ucomm(4).
case sy-ucomm(4).
when 'P--'.
perform cc_firstpage.
when 'P-'.
perform cc_prevpage.
when 'P+'.
perform cc_nextpage.
when 'P++'.
perform cc_lastpage.
when 'EX--'.
perform cc_firstcopy.
when 'EX-'.
perform cc_prevcopy.
when 'EX+'.
perform cc_nextcopy.
when 'EX++'.
perform cc_lastcopy.
I guess it can give you some lead.
K.Kiran. -
VB code for fitting graphics, deleting pages, updating TOC
Thanks again to all who helped me to find the object model info and other specifics I needed for completing my VB project. I'm not sure if this will be of any use to those who helped me, but at least I can "pay it forward".
The following code snippets are from my live project, with a bunch of ancillary code stripped away. I think I included everything needed for these three bits of functionality (fit graphics proportionally to frames, delete pages, update TOC), but if I accidentally left out something important, let me know (respond to this thread, as I'm not able to monitor all the threads). Note that in some cases, the code expects values in variables to be set outside of this code. I'll trust that anyone using this code can do that, and I've noted where this takes place.
My document uses only single pages, not facing-page spreads, so code referencing spreads works for me--but if you're using actual spreads, you may need to change the code to reference pages instead of spreads. Please bear in mind, I'm pretty new to ID, so if I misunderstood how pages and spreads (or anything else) work, please be kind. It's working for me, and hopefully will for others.
Be advised that deleting spreads (and possibly even fitting graphics) with LOCKED content (in the case of deleting, if ANYTHING on the page is locked) will cause InDesign to CRASH. If you have locked content on your pages, unlock it first either manually or through code (I have code for that as well, if anyone needs it).
The code for deleting spreads allows you to specify the spreads to delete by LABEL. I haven't figured out (anyone?) how to set labels through ID itself, but I was able to do it in code.
Lastly, please be advised that the forum may not properly indent or format the code. If it doesn't look pretty, it's not my doing. :)
VB Code follows:
Dim InDesign As Object
Dim InDesignDocument As Object
Dim LinkCt As Integer
Dim SpreadsCt As Integer
Dim PageLabel As String
Dim TOCStylesCt As Integer
Dim i As Integer
Dim p As Integer
'Create an InDesign object reference and open the InDesign
'document specified by DocumentFilespec. Note that if InDesign
'is and the selected document are already open, the in-memory
'copies will be used.
Set InDesign = CreateObject("Indesign.Application.CS3")
Set InDesignDocument = InDesign.Open(DocumentFilespec)
'Loop through all linked graphic frames and fill
'frame proportionally.
LinkCt = CInt(InDesignDocument.Links.Count)
For i = 1 To LinkCt
InDesignDocument.Links(i).Parent.Fit 1718185072
Next i
'This code deletes selected spreads (or pages if not using facing
'pages). It expects each spread to have a label, and it expects
'an array DeletePages to contain a list of the labels for pages
'to be deleted. DeletePagesCt is a count of the total number of
'items in the DeletePages array
For i = 1 To DeletePagesCt
SpreadsCt = InDesignDocument.Spreads.Count
For p = 1 To SpreadsCt
PageLabel = Trim(InDesignDocument.Spreads(p).Label)
If PageLabel <> "" And DeletePages(i) = PageLabel Then
InDesignDocument.Spreads(p).Delete
Exit For
End If
Next p
Next i
'This code updates the Table of Contents for a given TOC Style Name
'(ExpectedTOCStyleName).
TOCStylesCt = CInt(InDesignDocument.TOCStyles.Count)
For i = 1 To TOCStylesCt
If InDesignDocument.TOCStyles.Item(i) = ExpectedTOCStyleName Then
InDesignDocument.CreateTOC InDesignDocument.TOCStyles.Item(i), True
Exit For
End If
Next iIf I understand your question correctly that you want to know how to give an object in InDesign a Script Label (not using a script), then below is how (I needed to do it for the templates I'm using in the current project I'm doing using VBscript). Hope I was able to help some one else for a change. :-)
Window > Automation > Script Label
Select the Object
Enter the text in the Script Label box -
How to create function code for field in GRID like list box in screen
Hi all,
I have requirement like drop down is created for field1 in GRID,
and have given f4 help for it, as soon as i change the data in the field
event has to trigger to update thevalues in other field.
This scenario i worked on screens where field is created with listbox and assign function code to it
when the field value changes the event triggers .
Is there is anything like that which will fire the event for field value changes.
can i update anything through the fieldcatalogue.
anybody help me on this
Regards,
MadhaviHi Madhavi,
yes we can do that by registering edit events..
check the below example.. has both the variants dropdown/f4 hlp...
screen flow logic
PROCESS BEFORE OUTPUT.
MODULE pbo.
PROCESS AFTER INPUT.
MODULE pai AT EXIT-COMMAND.
program
* CLASS lcl_event_responder DEFINITION *
CLASS lcl_event_responder DEFINITION.
PUBLIC SECTION.
DATA : ls_changed_cell TYPE lvc_s_modi,
lv_language TYPE spras..
METHODS refresh_changed_data FOR EVENT data_changed
OF cl_gui_alv_grid
IMPORTING er_data_changed
e_ucomm.
ENDCLASS. "event_responder DEFINITION
DATA: go_handler TYPE REF TO lcl_event_responder,
go_container TYPE REF TO cl_gui_custom_container,
go_grid TYPE REF TO cl_gui_alv_grid,
gt_fieldcat TYPE lvc_t_fcat,
gv_language TYPE spras VALUE 'E',
gt_outtab TYPE TABLE OF makt WITH HEADER LINE.
PARAMETERS : dropdown TYPE char01 RADIOBUTTON GROUP grp,
f4help TYPE char01 RADIOBUTTON GROUP grp.
START-OF-SELECTION.
CALL SCREEN 100.
END-OF-SELECTION.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'BASIC'.
PERFORM create_and_init_alv CHANGING gt_outtab[]
gt_fieldcat.
ENDMODULE. "pbo OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
SET SCREEN 0. LEAVE SCREEN.
ENDMODULE. "pai INPUT
FORM create_and_init_alv CHANGING pt_outtab LIKE gt_outtab[]
pt_fieldcat TYPE lvc_t_fcat.
CHECK go_container IS NOT BOUND.
CREATE OBJECT go_container
EXPORTING
container_name = 'CUSTOM'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_container.
PERFORM build_display_table.
PERFORM build_fieldcat CHANGING pt_fieldcat.
IF dropdown EQ abap_true.
PERFORM set_drdn_table.
ENDIF.
go_grid->set_table_for_first_display( CHANGING it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab ).
go_grid->set_ready_for_input( 1 ).
" raises the 'data_changed' event when we select another cell/any action after changing the data
go_grid->register_edit_event( EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified ).
CREATE OBJECT go_handler.
SET HANDLER go_handler->refresh_changed_data FOR go_grid.
ENDFORM. "CREATE_AND_INIT_ALV
FORM build_display_table.
FREE gt_outtab.
SELECT * FROM makt UP TO 20 ROWS INTO TABLE gt_outtab WHERE spras EQ gv_language.
ENDFORM. "build_display_table
FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'MAKT'
CHANGING
ct_fieldcat = pt_fieldcat.
LOOP AT pt_fieldcat INTO ls_fcat.
IF ls_fcat-fieldname EQ 'SPRAS'.
ls_fcat-edit = abap_true..
ls_fcat-outputlen = 8.
IF dropdown EQ abap_true.
ls_fcat-drdn_hndl = '1'.
ls_fcat-checktable = '!'. "do not check foreign keys
ENDIF.
MODIFY pt_fieldcat FROM ls_fcat.
ENDIF.
ENDLOOP.
ENDFORM. "build_fieldcat
FORM set_drdn_table.
CHECK go_grid->offline( ) IS INITIAL.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'EN'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'DE'.
APPEND ls_dropdown TO lt_dropdown.
CALL METHOD go_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.
ENDFORM. " set_drdn_table
FORM change_display_table USING pv_language pv_rowno TYPE i.
READ TABLE gt_outtab INDEX pv_rowno.
SELECT SINGLE * FROM makt INTO gt_outtab WHERE matnr = gt_outtab-matnr AND spras = pv_language.
IF sy-subrc EQ 0.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ELSE.
CLEAR : gt_outtab-maktx,
gt_outtab-maktg.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ENDIF.
ENDFORM. "change_display_table
* CLASS event_responder IMPLEMENTATION *
CLASS lcl_event_responder IMPLEMENTATION.
METHOD refresh_changed_data.
READ TABLE er_data_changed->mt_mod_cells INTO ls_changed_cell INDEX 1.
CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
EXPORTING
input = ls_changed_cell-value
IMPORTING
output = lv_language.
PERFORM change_display_table USING lv_language ls_changed_cell-row_id.
go_grid->refresh_table_display( ).
ENDMETHOD. "click
ENDCLASS. "event_responder IMPLEMENTATION
Cheers,
Jose. -
Function code for dropdown on OO ALV Grid to trigger user_command
Hi Experts,
I know we can add a dropdown to a column of an OO ALV Grid, set values to the dropdown list and allow the user to select some these values.
However , what I'm not sure is that if we can *assign a function code to the dropdown * which would then trigger the event user_command ( PAI ) of the ALV class so I can handle the changes to when a particular value is selected from a dropdown list, just like we do in normal dialogs.
Now I know that I can register the 'Enter' event and handle the data changes in data_changed event, but that is something I want to avoid the user from doing as far as possible to make the report more user friendly.
Awaiting your valuable inputs and would really appreciate your help.
Thanks & regards,
AdvaitHi Advait,
No problem. Yes, this functionality requires changing the focus to other cell.
I think there is other solution. As the dropdown is kind of F4 activity try this way:
data: it_f4 type lvc_t_f4,
wa_f4 type lvc_s_f4.
wa_f4-FIELDNAME = 'CONNID'.
wa_f4-REGISTER = 'X'.
wa_f4-GETBEFORE = 'X'.
wa_f4-CHNGEAFTER = 'X'.
append wa_f4 to it_f4.
"register F4 event
CALL METHOD g_alv_grid_ref->register_f4_for_fields
EXPORTING
it_f4 = it_f4.
"Once you try to pick the value HANDLE_DATA_CHANGED event will be triggered
"Definition
methods:
handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed e_onf4 e_onf4_before e_onf4_after,
"Implementation
METHOD handle_data_changed .
DATA: ls_mod_cells TYPE lvc_s_modi.
IF e_onf4_before = 'X'.
MESSAGE 'Data changed before F4' TYPE 'I'.
ENDIF.
IF e_onf4 = 'X'. "if event triggered by F4
MESSAGE 'Data changed on F4' TYPE 'I'.
ENDIF.
IF e_onf4_after = 'X'.
MESSAGE 'Data changed after F4' TYPE 'I'.
ENDIF.
"here you know which cell was modified
LOOP AT er_data_changed->mt_mod_cells INTO ls_mod_cells.
"just example test case, here you can implement your code for modified cells
IF ls_mod_cells-value >=5.
CALL METHOD er_data_changed->add_protocol_entry
EXPORTING
i_msgid = 'SABAPDOCU'
i_msgty = 'E'
i_msgno = '888'
i_msgv1 = 'Only numbers below 5 are possibe'
i_msgv2 = 'Please correct'
i_fieldname = ls_mod_cells-fieldname
i_row_id = ls_mod_cells-row_id.
CALL METHOD er_data_changed->modify_cell
EXPORTING
i_fieldname = ls_mod_cells-fieldname
i_row_id = ls_mod_cells-row_id
i_value = space.
ENDIF.
ENDLOOP.
ENDMETHOD. "handle_data_changed
This approach works fine for picking value from input help. Never tried it for dropdown list. You have to try it out.
Regards
Marcin -
Hello Folks ,
Iv'e Created a new screen using BDT technology and added a button inside screen .
how can i handle the function code within this screen in a way that i won't have system messeage "Unknown function code XXX" while clicking on this button.
tanks in advance.
Herzel .Hi,
You need to implement for your button a function module for the BDT event FCODE. You can have a look at the fms *_BUPA_EVENT_FCODE, to get an idea on how to implement it.
Thanks and warm regards,
Smita. -
Transaction code for mass cancelation of delievry document and sales docume
Dear All,
Is there any transaction for mass cancellation of delievry document and sales docume.
any suggestion
Thanks with Regards
Subrat
Edited by: subu sd on Jul 15, 2009 7:49 AMHi ,
Adding to Eduarodo's Point, if you dont want to Archive the documents and just wanted to cancel then you can do this by LSMW or eCATT.
First cancel all the subsequent document and then Sales order . In sales order put Reason for rejection.
Thanks,
Raja -
How to create new logical function codes for Subtype
Hi all
I'm developing an WF that must be started when the user makes any change in a employee position. The problem is that this change can be made by many transactions, I know that it´s possible to do it by PA30/PA40, and today it´s made here using PP01. The Functional Consultant said to me that the better way to map all possible trasactions which made that kind of changes in an employee data is by adding new "Logical Funcion codes" (or Activities) for our specif subinfotypes.
The table that contains such information is T77FLC. How can I add that new activities for a subinfotype, by a costumizing or just adding new entries in this table?
Thanks in AdvanceJosie,
You can configure your own workflow events based on HR objects/infotypes/subtypes/update type/activity type combinations using transaction SWEHR3. Look at SWEHR2 for the standard events to get some idea of what you need to enter in SWEHR3.
The relationship between the infotype and the matching business object type is held in SWEHR1.
Regards,
Jocelyn -
How to create new logical function codes for Subinfotype
Hi all
I'm developing an WF that must be started when the user makes any change in a employee position. The problem is that this change can be made by many transactions, I know that it´s possible to do it by PA30/PA40, and today it´s made here using PP01. The Functional Consultant said to me that the better way to map all possible trasactions which made that kind of changes in an employee data is by adding new "Logical Funcion codes" (or Activities) for our specif subinfotypes.
The table that contains such information is T77FLC. How can I add that new activities for a subinfotype, by a costumizing or just adding new entries in this table?
Thanks in AdvanceJosie,
You can configure your own workflow events based on HR objects/infotypes/subtypes/update type/activity type combinations using transaction SWEHR3. Look at SWEHR2 for the standard events to get some idea of what you need to enter in SWEHR3.
The relationship between the infotype and the matching business object type is held in SWEHR1.
Regards,
Jocelyn -
How to find function code for Dynamic generated program
Hi,
I have created a dynamic program for getting different selection screens depending on inputs . I am finding a flaw that, pressing 'BACK' buttn is leading some other action which was coded by me, instead of going back.
SY-UCOMM is also not working as it is dynamic program.
Help me for getting previous screen.
Please suggest me the inputs.Thank u
Regards
AdityaHi Klaus,
As per ur instructions, I replaced SY-UCOMM with SSCRFIELDS.
But no change in my problem.
The following screen shot is a program which is coded dynamically using fieldsymbols.
When I press BACK here for the following code selectionscreen, I am getting someother action which was coded by me. But not going back.
Twist is, SSCRFIELDS-UCOMM or SY-UCOMM is getting captured for 'F8', but not 'BACK'.
I hope, I have explained my issue clearly. Please let me know, if any deep clarifications needed.
Regards,
Aditya
Maybe you are looking for
-
Can not open links in mail on ipad mini
I can not open a link to safari from the mail app on an iPad mini. is their setting for this function somewhere?
-
My 6 turned off with a full charge and will. It turn back on. Have tried resetting, flipping mute switch and all recommended Apple suggestions. It very briefly flashes the Apple logo and then nothing. There is a slight color change of the screen, b
-
How Do You Use Your Blackberry--Email
Hi, all, Being a Blackberry aficionado, I find all of the different things your Blackberry can do for you amazing. One of the best features of all Blackberry devices is email. With your email pushed directly to your device, you don't have to be nea
-
SMTPD consumes all available RAM resources
Hi all, I have a mail server that has extremely heavy disk activity after a few minutes of being booted, I have narrowed this down to heavy RAM usage by the SMTPD process. In Activity monitor, multiple SMTPD processes are spawned, consuming up to 2GB
-
Deploy BPM Enterprise - Scripts
Hello all guys I am working on a document for deployment on BPM Enterprise and i have finished it, but i focused only on deploying using the process administrator console. Is there any way to make a deployment using some kind of scripts? so that mult