Trigger a workflow from module pool screen at save button
Hi,
I am new to workflow.Please help me.My requirement is trigger a custom workflow from module pool screen at save button.
Scenario is: Create a Z screen for material creation and after pressing save button workflow should trigger to approver and approver emailid should be fetch from Z table and have to provide a link in work flow for Z t-code which displays a report of material pending for approval..
Please suggest me process how i can acheive this..
Thanks
Hi,
If you're using standard bapi's to save the material, you can then use either the standard events which are already triggered or you coul add a change document for material changes or creation.
Then this event can be the trigger of your custom workflow.
Kind regards, Rob Dielemans
Similar Messages
-
How to trigger abap report from module pool
hi,
continuing with this link
table control this is done (Module pool )
there were two buttons (accept and delete )in the module pool..so when the user clik 'accepts ' the records (from table control ) then it shud call abap report which will run in background..
so how do we pass the values selected from table control to the abap report in one go.....as only one background job has to run..say if there are 10 entries then it shud take all the 10 entries and trigger the abap report where it will do the processing with the selected 10 records in the abap report.
Thanks
Mohan..Declare the parameters of the report as select options and call it using submit statement.
link:[http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_VIA_JOB.htm] -
Caling smart form from module pool
Hi,
i want to call smartform from module pool screen when click on some pushbutton.
ex i want to call smart form of sales order by passing perticular S.O number from module pool screen.
plz help me o get this.
thanks.Hi,
Enable hotspot option in the field catalog for the .SO.NUMBER field. On clicking on SO.Number
get the cursor field value and call the smart form in the PAI (ie., in user_command module).
Probably pick ucomm triggers with hotspot.
Venkat. -
How to extract the data from module pool program to Excel Sheet?
Hi Guys
I am having a requirement to transfer the data from Module pool screen to excel sheet directly.
This is an urgent requirement.
So plz reply me with some coding examples.
I will give points for that.This report extract excel file. From that concept you can easily extract data from module pool program also by coding in PAI of the screen.
REPORT ztest1 .
* this report demonstrates how to send some ABAP data to an
* EXCEL sheet using OLE automation.
include ole2incl.
* handles for OLE objects
data: h_excel type ole2_object, " Excel object
h_mapl type ole2_object, " list of workbooks
h_map type ole2_object, " workbook
h_zl type ole2_object, " cell
h_f type ole2_object, " font
h_c type ole2_object. " color
DATA: FILENAME LIKE RLGRAP-FILENAME.
tables: spfli.
data h type i.
* table of flights
data: it_spfli like spfli occurs 10 with header line.
*& Event START-OF-SELECTION
start-of-selection.
* read flights
select * from spfli into table it_spfli.
* display header
uline (61).
write: / sy-vline no-gap,
(3) 'Flg'(001) color col_heading no-gap, sy-vline no-gap,
(4) 'Nr'(002) color col_heading no-gap, sy-vline no-gap,
(20) 'Von'(003) color col_heading no-gap, sy-vline no-gap,
(20) 'Nach'(004) color col_heading no-gap, sy-vline no-gap,
(8) 'Zeit'(005) color col_heading no-gap, sy-vline no-gap.
uline /(61).
* display flights
loop at it_spfli.
write: / sy-vline no-gap,
it_spfli-carrid color col_key no-gap, sy-vline no-gap,
it_spfli-connid color col_normal no-gap, sy-vline no-gap,
it_spfli-cityfrom color col_normal no-gap, sy-vline no-gap,
it_spfli-cityto color col_normal no-gap, sy-vline no-gap,
it_spfli-deptime color col_normal no-gap, sy-vline no-gap.
endloop.
uline /(61).
* tell user what is going on
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
* PERCENTAGE = 0
text = text-007
exceptions
others = 1.
* start Excel
create object h_excel 'EXCEL.APPLICATION'.
* PERFORM ERR_HDL.
set property of h_excel 'Visible' = 1.
* CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:kis_excel.xls'
* PERFORM ERR_HDL.
* tell user what is going on
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
* PERCENTAGE = 0
text = text-008
exceptions
others = 1.
* get list of workbooks, initially empty
call method of h_excel 'Workbooks' = h_mapl.
perform err_hdl.
* add a new workbook
call method of h_mapl 'Add' = h_map.
perform err_hdl.
* tell user what is going on
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
* PERCENTAGE = 0
text = text-009
exceptions
others = 1.
* output column headings to active Excel sheet
perform fill_cell using 1 1 1 200 'Carrier id'(001).
perform fill_cell using 1 2 1 200 'Connection id'(002).
perform fill_cell using 1 3 1 200 'City from'(003).
perform fill_cell using 1 4 1 200 'City to'(004).
perform fill_cell using 1 5 1 200 'Dep. Time'(005).
loop at it_spfli.
* copy flights to active EXCEL sheet
h = sy-tabix + 1.
if it_spfli-carrid cs 'AA'.
perform fill_cell using h 1 0 000255000 it_spfli-carrid.
elseif it_spfli-carrid cs 'AZ'.
perform fill_cell using h 1 0 168000000 it_spfli-carrid.
elseif it_spfli-carrid cs 'JL'.
perform fill_cell using h 1 0 168168000 it_spfli-carrid.
elseif it_spfli-carrid cs 'LH'.
perform fill_cell using h 1 0 111111111 it_spfli-carrid.
elseif it_spfli-carrid cs 'SQ'.
perform fill_cell using h 1 0 100100100 it_spfli-carrid.
else.
perform fill_cell using h 1 0 000145000 it_spfli-carrid.
endif.
if it_spfli-connid lt 400.
perform fill_cell using h 2 0 255000255 it_spfli-connid.
elseif it_spfli-connid lt 800.
perform fill_cell using h 2 0 077099088 it_spfli-connid.
else.
perform fill_cell using h 2 0 246156138 it_spfli-connid.
endif.
if it_spfli-cityfrom cp 'S*'.
perform fill_cell using h 3 0 155155155 it_spfli-cityfrom.
elseif it_spfli-cityfrom cp 'N*'.
perform fill_cell using h 3 0 189111222 it_spfli-cityfrom.
else.
perform fill_cell using h 3 0 111230222 it_spfli-cityfrom.
endif.
if it_spfli-cityto cp 'S*'.
perform fill_cell using h 4 0 200200200 it_spfli-cityto.
elseif it_spfli-cityto cp 'N*'.
perform fill_cell using h 4 0 000111222 it_spfli-cityto.
else.
perform fill_cell using h 4 0 130230230 it_spfli-cityto.
endif.
if it_spfli-deptime lt '020000'.
perform fill_cell using h 5 0 145145145 it_spfli-deptime.
elseif it_spfli-deptime lt '120000' .
perform fill_cell using h 5 0 015215205 it_spfli-deptime.
elseif it_spfli-deptime lt '180000' .
perform fill_cell using h 5 0 000215205 it_spfli-deptime.
else.
perform fill_cell using h 5 0 115115105 it_spfli-deptime.
endif.
endloop.
* EXCEL FILENAME
CONCATENATE SY-REPID '_' SY-DATUM+6(2) '_' SY-DATUM+4(2) '_'
SY-DATUM(4) '_' SY-UZEIT '.XLS' INTO FILENAME.
CALL METHOD OF H_MAP 'SAVEAS' EXPORTING #1 = FILENAME.
free object h_excel.
perform err_hdl.
* FORM FILL_CELL *
* sets cell at coordinates i,j to value val boldtype bold *
form fill_cell using i j bold col val.
call method of h_excel 'Cells' = h_zl
exporting
#1 = i
#2 = j.
perform err_hdl.
set property of h_zl 'Value' = val .
perform err_hdl.
get property of h_zl 'Font' = h_f.
perform err_hdl.
set property of h_f 'Bold' = bold .
perform err_hdl.
set property of h_f 'Color' = col.
perform err_hdl.
endform. "FILL_CELL
*& Form ERR_HDL
* outputs OLE error if any *
* --> p1 text
* <-- p2 text
form err_hdl.
if sy-subrc <> 0.
write: / 'OLE-Automation Error:'(010), sy-subrc.
stop.
endif.
endform. " ERR_HDL -
Call module pool screen from ABAP Webdynpro
Hi All
I designed one screen in normal classical dynpro in SE80 for module pool program. I want to call that screen layout design in webdynpro view layout.
So please help me how can i call that module pool screen from my ABAP webdynproHi
Thank you for your great replay. But Mr Ramakrishnappa and Mr Katrice as your reference i go through that but when i insert the program name and screen number program is end with a run time error saying
dynamic type conflict when assigning reference.
Please refer the below snap shot -
Call LSMW from a Module pool screen
Hi SAP gurus,
In order to call an LSMW from a module pool screen, there is a Function module which I have used earlier, but unable to recollect it. Can someone please tell me the FM which we need to use ?Sudhakar,
Create an LSMW and assign it to a tcode and then call this tcode from the module pool program so that it will skip all the screens just by allowing the user to input the files and run the lswm.
Regarding the FM I have no idea.
K.Kiran. -
Regarding exit from the module pool screen
h experts,
i have developed a module pool report in which in the selection screen i have four fields which are mandatory ,when i execute the program without entering in the selection screen it do not allow to come out of the module pool screen ...what i want that without entering any input in the selection screen if i press exit button push button it will allow to come out of the screen for this what sud i do plz help me....Hi
keep a button called <b>EXIT</b> on the screen
Make the function type of that field as <b>E</b>
in Flow logic write
PROCESS AFTER INPUT.
Forced Exit from the transaction from screen
MODULE exit AT EXIT-COMMAND.
double click on exit module and
then in PAI write
*& Module exit INPUT
Exit from the Transaction
MODULE exit INPUT.
CASE okcode.
WHEN 'EXIT' OR 'CANCEL'.
CLEAR okcode.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " exit INPUT
<b>Reward points for useful Answers</b>
Regards
Anji -
Urgent : Smartforms: Direct printing from module pool/dialog screen
Hi all,
i have a module pool screen where in from a screen i have some inputs from the user and after saving user wud click on a button called print which shud print a slip containing the screen data.now for this purpose i have made a smartform which on execution of it's driver program fetches data from DB table and puts on to SF.
NOW MY ISSUE IS AS SOON AS THE USER PRESSES PRINT THE SMARTFORM SHUD DIRECTLY GET PRINTED.
WAITING FOR ANSWERS
THANKS AND REGARDS,
SSACHIN SONIcool dude that wrked,thx giving u full points.i have on emore issue if u can help:
this driver program needs an input for which i've made a selection screen for testing but as i need to launch it frm mod pool screen i want that this program shud automatically get data(thr's only 1 field ) and shud nt get stopped at the selection screen.
thanks
sachin -
Copying from report output to a module pool screen
Hi to all experts
My requirement is to call a transaction when i click a button in module pool programme .when i execute that transaction an alv report is displayed and user selects some records that should be copied over to the module pool screen.Yous should use ALV OOps concept to capture the selected data in the ALV report , and once you return back you can update yr module pool .
-
Module pool screen field should default without pressing enter
Hi
I have got a main module pool screen which has a tabstrip with four tabs.
There are 2 fields in the main screen when we select from F4 for the first field then the field 2 should default in case of a condition.
This happens only when i press enter. I want the second field to change as soon as the first field is selected.
How do I trigger the PAI as soon as the field 1 is selected.
eg: Field 1 : i/p
Field 2 : display
Field 3 : i/p
On F4 for field 1 say i select value 'A' then the valu for field 3 should default to value 'B'. Also field 2 should be displayed based on combination of field 1 and field 2. But now it does it only on pressing enter.
How do I solve this problem?Also if i select field 1 value A and dont press enter and go to the subscreen tab then it does not do any thing. It allows to go on the subscreen tab. But actually it should default the field 3 value. It does it only when I press enter.
Also the F4 is from dictionary that is the screen fields are from dictionary. I have not created any F4 for the fields.
Please help me solve this problem
Regards,
mozilaHi
You can achieve this using List Box only not by Input Field. Since Input field doesn't trigger automatic PAI/PBO
Go through the below thread
populate drop down menu based on entry in another field
or an alternative is--> In PBO use POPUP_GET_VALUES Fm to get the First input field based on that you can enter further values
unicode error
Cheerz
Ram -
How to use table maintenance view in module pool screen
hi ,
want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.You can simply call it via SM30. Or you can call the table maintence view from any program(report or module pool) using a function module.
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U'
view_name = 'Z_Table_Name'
exceptions
client_reference = 1
foreign_lock = 2
invalid_action = 3
no_clientindependent_auth = 4
no_database_function = 5
no_editor_function = 6
no_show_auth = 7
no_tvdir_entry = 8
no_upd_auth = 9
only_show_allowed = 10
system_failure = 11
unknown_field_in_dba_sellist = 12
view_not_found = 13
others = 14.
Regards,
RIch Heilman -
How to insert tabstrip control in module pool screen painter
Hi all!
plz tell e how to use tabstrip control in module pool screen painter.Also plz give me an example program using tabstrip control.To insert tabstrip just open layout of screen and press on the tabstrip button there .
Use this souce code further to activate it .
CONTROLS tabstrip TYPE TABSTRIP.
DATA: okcode TYPE sy-ucomm,
dynnr TYPE sy-dynnr,
flag type flag,
active like tabstrip-activetab .
call SCREEN 100.
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
data: lv_okcode type syucomm.
lv_okcode = okcode.
clear okcode.
case lv_okcode.
WHEN 'TAB1'.
dynnr = '0110'.
WHEN 'TAB2'.
dynnr = '0120'.
WHEN 'TAB3'.
dynnr = '0130'.
WHEN 'TAB4'.
dynnr = '0140'.
WHEN 'TAB5'.
"check authorization, if authorization fails
flag = 'X'. "set the global flag
active = 'TAB1'. "store active tab in global variable
dynnr = '0110'. "set the screen number
WHEN 'BACK' or 'EXIT'.
leave program.
ENDCASE.
IF lv_okcode(3) = 'TAB'.
tabstrip-activetab = lv_okcode.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN'.
SET TITLEBAR 'xxx'.
IF tabstrip-activetab IS INITIAL OR
dynnr IS INITIAL.
tabstrip-activetab = 'TAB1'.
dynnr = '0110'.
ENDIF.
"set the activetab explicilty here
if flag eq 'X'. "from authorization failure
tabstrip-activetab = active. "'TAB1'
clear flag.
endif.
ENDMODULE. " STATUS_0100 OUTPUT -
Displaying MIR4 attachment list TIF image in module pool screen
Hi All,
I have a screen with a custom container and I tried to call a TIF image from MIR4 which is in attachment list(which is stored in archived link).
I need a function module to display this image in my Module pool screen using the container.
I tried using below code
* Create controls
CREATE OBJECT container_1
EXPORTING
container_name = 'CONTAINER'.
* create object container_2
* exporting container_name = 'PICTURE_CONTROL_2'.
CREATE OBJECT PICTURE_CONTROL_1
EXPORTING
parent = container_1.
* CREATE OBJECT PICTURE_CONTROL_2 exporting parent = container_2.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
EXPORTING
* URL = 'SAPR3://984BE16932C81EE3B2AA1E3B0D12C6FF'
* URL = 'file://E:\Personal\New_Passport4.jpg'
* URL = 'SAPR3://984BE16932C81EE3B2BDF8E44B035648.TIF'
*URL = 'SAPR3://SAPR3CMS/get/100/Z1/984BE16932C81EE3B2BDF8E44B035648//.TIF'.
URL = 'SAPR3://WebRepository/0020698212/DEMOWORD97SAPLOGO?Version=00000'
IMPORTING
RESULT = lv_result.
CALL METHOD PICTURE_CONTROL_1->set_display_mode
EXPORTING
display_mode = PICTURE_CONTROL_1->display_mode_fit_center.
But I am able to display this URL = 'SAPR3://WebRepository/0020698212/DEMOWORD97SAPLOGO?Version=00000' and not able to display my archive link image which is in TIF.
note: Display image of Arc.link Doc.type ZBUSI_TIF (doc.class TIF)
Please help me on this.
Thanks
Geetha CharanHi sai,
Please refer th procedure.
For the select-options you might have defined a selection screen.
Next you can fetch the entire data that you wanted to display in a module pool into an internal table.
you can call the screen you defined for o/p upon the selection.
Then, You define a screen XXXX and a table control in the scree, and in the PAI module of the screen
you write a chain end chain processing in which you can display the contents of your internal table.
OR
if you want the selection also to be in the module pool, then for displaying the O/P you can definr a sub-screen of the initial screen and you can call that sub-screen on selcting, which can be done with a function code.
Hope this helps -
Display Continuous Fluctuations in Input Data in Module Pool Screen
Dear All,
We are working on a Weighbridge Interface scenario, where the weighbridge is sending data to a digitizer, which is connected to the COM port of a PC. The objective is to read the data from the digitizer, and display in a Module pool screen. However, there is one more requirement: the weight may fluctuate until it stabilizes, and the fluctuations have to be displayed on screen. For example, the tare weight of a vehicle may be 12.4 TON, but when the vehicle is standing on the weighbridge, the weight may vary from 10.4 to 12.4 TON. The idea is to capture the stable weight, so that any discrepancies can be avoided. In the current IT system implementation, the fluctuations in the weight are displayed. But using ABAP, can these fluctuations be captured? For example, we may design a screen containing a field for capturing the weight, and the weight displayed there automatically refreshes as soon as there is a change in the digitizer reading. Is this possible to achieve? If so, how?
Awaiting answers.
Thanks and Regards,
SidHi Sid,
just a suggestion for the refreshing of an ABAP screen: you can use class CL_GUI_TIMER, but it only handles whole seconds, i.e. 1 second, 2 seconds and so on, but not 0.5 seconds...
An example of an ABAP listing could be the following:
*& Report ZZAVV001
REPORT zzavv001 NO STANDARD PAGE HEADING.
CONSTANTS: c_yes(1) TYPE c VALUE 'X'.
DATA: BEGIN OF t_bseg OCCURS 0.
INCLUDE STRUCTURE bseg.
DATA: END OF t_bseg.
data: d_num_bkpf type i,
d_num_bseg type i.
PARAMETERS: interval TYPE i DEFAULT 5. "meaning 5 seconds
* CLASS lcl_receiver DEFINITION
CLASS lcl_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_finished FOR EVENT finished OF cl_gui_timer.
ENDCLASS. "lcl_receiver DEFINITION
* Global data
DATA:
test TYPE i,
receiver TYPE REF TO lcl_receiver,
timer TYPE REF TO cl_gui_timer.
START-OF-SELECTION.
CREATE OBJECT timer.
CREATE OBJECT receiver.
SET HANDLER receiver->handle_finished FOR timer.
timer->interval = interval.
CALL METHOD timer->run.
PERFORM load_data. "or whatever you have to do to read the weight
PERFORM show_list. "or whatever you have to do to print the weight you've read
* CLASS lcl_receiver IMPLEMENTATION
CLASS lcl_receiver IMPLEMENTATION.
METHOD handle_finished.
PERFORM carga_datos.
PERFORM muestra_listado.
CALL METHOD timer->run.
ENDMETHOD. "handle_finished
ENDCLASS. "lcl_receiver IMPLEMENTATION
*& Form load_data
* text
FORM load_data.
clear: d_num_bkpf,
d_num_bseg.
select single count( * )
into d_num_bkpf
from bkpf.
select single count( * )
into d_num_bseg
from bseg.
ENDFORM. "load_data
*& Form show_list
* text
FORM show_list.
get time.
skip to line 1.
position 1.
write: / 'Date / Time:', sy-datum, sy-uzeit.
write: / 'Number of BKPF records:', d_num_bkpf.
write: / 'Number of BSEG records:', d_num_bseg.
ENDFORM. " show_list
Okay, it's just a tiny code snippet, but I hope it may help you by designing auto-refreshing screens.
Kind regards,
Alvaro -
Expand/collapse button functionality on module pool screen
Hi ,
I want to design a module pool screen with a expand/collapse button on it.
The desired functionality associated with this button would be something similiar to that available in ME21N screen. When the expand button is clicked it should open up a section of screen that allows the user to enter some parameter. Based on this parameter some selections from DB can be perfomed and then displayed below it.
Any pointers on how to achieve this? Any kind of help would be appreciated.
Regards-
Harmeet Singh.example for three pushbutton with expand collapse .
First of all define your push button as output field with icon tick in the pushbutton characteristick,
then define this pushbutton in top_include
include <icon>.
data : push_a1 like icons-l4,
push_a2 like icons-l4,
push_a3 like icons-l4.
data : a1 ,
a2,
a3.
in pai of the screen
suppose i had assign function code a1 ,a2 , a3 for repective pushbutton
module user_command_9002 input.
okcd = ok_code.
clear ok_code.
case okcd.
when 'A1'.
if a1 is initial.
a1 = 'X'.
else.
clear a1.
endif.
when 'A2'.
if a2 is initial.
a2 = 'X'.
else.
clear a2.
endif.
when 'A3'.
if a3 is initial.
a3 = 'X'.
else.
clear a3.
endif.
endcase.
endmodule. " USER_COMMAND_9002 INPUT
define three seprate screen -group for three pushbutton say a1 a2 a3
during pbo you can directly assign name of icon .
if a1 is initial.
push_a1 = icon_collapse.
else.
push_a1 = icon_expand.
endif.
if a2 is initial.
push_a2 = icon_collapse.
else.
push_a2 = icon_expand.
endif.
if a3 is initial.
push_a3 = icon_collapse.
else.
push_a3 = icon_expand.
endif.
loop at screen.
if screen-group1 = 'A1'.
if a1 = 'X'.
screen-invisible = 1.
screen-input = 0.
modify screen.
else.
screen-active = 1.
screen-invisible = 0.
screen-input = 1.
endif.
elseif screen-group1 = 'A2'.
if a2 = 'X'.
screen-invisible = 1.
screen-input = 0.
modify screen.
else.
screen-active = 1.
screen-invisible = 0.
screen-input = 1.
endif.
elseif screen-group1 = 'A3'.
if a3 = 'X'.
screen-invisible = 1.
screen-input = 0.
modify screen.
else.
screen-active = 1.
screen-invisible = 0.
screen-input = 1.
endif.
endif.
endloop.
regards,
Alpesh
Edited by: Alpesh on May 28, 2009 10:28 AM
Maybe you are looking for
-
Receiver FTP channel showing error
I am facing some bizarre error even though my target directory for target ftp location is correct I checked all the parameters but didnt find out the issue. I have attached the screenshot for Receiver file channel. Please help and do reply. Below is
-
User writes on console(client) and sent what was written to server
Hi, As said in the previous post I have a server which contains a folder with files and I am sending the name of each file to the client. I managed to do this successfully. Now the problem is that I want the server and client to wait until the user w
-
I have flixster that I have been trying to update since may 30 and now my kindle app started tonight. With the flixster it is just greyed out with a progress bar under it but it never moves. The kindle says update could not be downloaded. It is greye
-
I send the frame by a microcontroller ( 8bits) the fram contains 6 bytes, 2bytes conform a long variable, I want to decode the frame and make operations with these long variables and then plot them
-
I can see my spelling is not the best. Anyway, since I´ve updated mozilla, it freezez almost every time I´m out surfing. It didn´t do that before. I have to close it with the activity-manager almost everytime. What´s wrong with it? Explorer works bet