User command is not getting triggered in interactive ALV with LIST display
Hi experts,
I have developed an interactive ALV report with LIST display. Here, the issue is, when i double click a record in the primary ALV list, the control must go to the USER COMMAND event which i have written in my report. But the user command event is not getting triggered at all when i double click any record.
It gives the following information instead.
"Choose a valid function".
(My user command name and its respective form name are same.)
Here is my code..
START-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = p_table
i_callback_user_command = 'TST1'
i_callback_pf_status_set = 'SET_PF_STATUS'
TABLES
t_outtab = <dyn_table>
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
FORM tst1 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Local data declaration
DATA: li_tab TYPE REF TO data,
l_line TYPE REF TO data.
* Local field-symbols
FIELD-SYMBOLS:<l_tab> TYPE table,
<l_wa> TYPE ANY.
* Create table
CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
ASSIGN li_tab->* TO <l_tab>.
* Create workarea
CREATE DATA l_line LIKE LINE OF <l_tab>.
ASSIGN l_line->* TO <l_wa>. CASE r_ucomm.
* When a record is selected
WHEN '&IC1'.
* Read the selected record
READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
rs_selfield-tabindex. IF sy-subrc = 0.
* Store the record in an internal table
APPEND <dyn_wa> TO <l_tab>.
* Fetch the field catalog info
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'Z_DEMO_PDF_JG'
i_structure_name = p_table
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Please advice what is the msitake i have done here..
Read the following code:
pass the i_callback_user_command = g_user_command to the ALV function module and write the FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
as shown below.
thanx
Data for ALV display
DATA : gt_fieldcat TYPE slis_t_fieldcat_alv,
gt_events TYPE slis_t_event,
g_variant LIKE disvariant,
g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
g_status TYPE slis_formname VALUE 'SET_PF_STATUS',
gt_list_top_of_page TYPE slis_t_listheader,
g_repid LIKE sy-repid,
gf_pos TYPE i
Data for ALV display
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_program = sy-repid
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
i_callback_user_command = g_user_command
i_save = 'A'
is_variant = g_variant
TABLES
t_outtab = it_print.
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN '&IC1'.
CASE selfield-sel_tab_field.
WHEN '1-KUNNR'.
READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
IF sy-subrc = 0.
SET PARAMETER ID 'BPA' FIELD wa_print-kunnr.
CALL TRANSACTION 'BP'.
ENDIF.
WHEN '1-MATNR'.
READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
IF sy-subrc = 0.
SET PARAMETER ID 'JP_ISS' FIELD wa_print-matnr.
CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN..
GET PARAMETER ID 'WRK' FIELD wa_zprint-werks.
SET PARAMETER ID 'VKO' FIELD wa_zprint-vkorg.
SET PARAMETER ID 'VTW' FIELD wa_zprint-vtweg.
CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN.
ENDIF.
Endcase.
Endform.
Similar Messages
-
AT USER COMMAND is not getting triggerd
Hi Techie's
I have two fields on the selection screen
1) Name: ___________
2) Id: ___________
I have some buttons say on the Application toolbar say::
Save Delete Modify Exit
I have created these buttons in the INITIALIZATION event.
I am using AT Selection Screen OUTPUT for some logic purpose.
Later I am writing AT USER COMMAND and pressing SAVE The function code for SAVE is "SAV".
But the drama is that AT USER COMMAND is not getting triggered at all.
It goes first to Initialization--->At selection Screen OUTPUT>Then screen appears> I give the values and press the SAVE button--
again it goes to the At Selection screen OUTPUT.
Not even getting the hang of it. Please help if anybody know the story of it.
ITS SO URGENT.At user command is for list processing, you need something like this:
Pushbuttons in the Application Toolbar
In the application toolbar of the standard GUI status of the selection screen, five pushbuttons are predefined with the function codes FC01 to FC05, but are inactive by default. You can activate them during the definition of the selection screen as follows:
SELECTION-SCREEN FUNCTION KEY i.
The numbering i must be between 1 and 5. The individual function texts must be assigned to the functxt_0i components of structure sscrfields before the selection screen is called. You must declare this structure as an interface work area using the TABLES statement.
If the user chooses one of these buttons, the runtime environment triggers the AT SELECTION-SCREEN event and the function code FC0i is placed into the component ucomm of the structure sscrfields.
After the AT SELECTION-SCREEN event has been processed, the system displays the selection screen again. The only way to exit the selection screen and carry on processing the program is to choose Execute (F8). Consequently, the pushbuttons on the application toolbar are more suitable for controlling dynamic modifications of the selection screen than for controlling the program flow.
REPORT demo_sel_screen_function_key.
TABLES sscrfields.
PARAMETERS: p_carrid TYPE s_carr_id,
p_cityfr TYPE s_from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
sscrfields-functxt_01 = 'LH'.
sscrfields-functxt_02 = 'UA'.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'.
ENDCASE.
START-OF-SELECTION.
WRITE / 'START-OF-SELECTION'.
This defines a standard selection screen with two parameters. In the application toolbar, two pushbuttons are assigned the texts LH and UA and activated.
When the user clicks one of the buttons, the AT SELECTION-SCREEN event is triggered and there the input fields are preassigned correspondingly. -
Enable User task is not getting triggered
Hi All
We have a provisioning workflow configured. "Enable User" task is not getting triggered while the user is enabled in OIM. Can anyone give a clue as to how to get it triggerd? Rest all the tasks are fine (Create, Disable, Delete, and other custom tasks)
Thanks,
VinayThere is a OOTB scheduled Task "Enable After Start Date". once the user get enabled in OIM user profile. You have to run this task manually to have effect on corresponding RO for enablement. Else it will execute automatically as per scheduled time.
if the version of OIM is 11.1.1.5. There is an issue. update patch BP02. for same
--nayan -
Events in USER objects type not getting triggered in PFCG
Hi,
We need to send some notifications to the concern person at the time of assiging roles to the user . There is an object type USER and has events like created,cloned, deleted, roles_changed. But these events not getting triggered.
I need to trigger the workflow. How do we activate the events as the entry doesnot exits in SWE2 tooo . Is ther any other way?HI munish
If the entry is not in swe2 Put the entry for the business object USER and use the receiver type as your workflow number.
Regards
vijay -
Main window of triggered page ( thr' COMMAND ) is not getting triggered.
Hi,
My requirement is as below -
I have 3 pages in smartform
FIRST page - next page of it is SECOND page
SECOND page - next page of it is SECOND page
and I have last page ( LAST_PAGE ), which is getting triggered for 1 of the condition.
Here, my main window in LAST_PAGE is not getting triggered; Can anyonw please advice on it.Hi,
If u have used Main Windows only then u can place the Command Node in First Page Itself after the command node 1to First ---> Second Page Trigger your Text nodes etc and again The Command Node 2 Second to Third based on condition else the same second page. Mainwindows will be accessed as specified in first page only .
IF secondary or other windows have been specified
Place the Command Node in the Second page and also add the Condition to the Command node the condition to get to last page.
Regards,
Vijaya Lakshmi.T -
UI not getting change update when working with LIST and INotifyPropertyChanged
i was trying to know two way data binding. i have simple car class which extend INotifyPropertyChanged for notify the change to update UI. bind List object to few textboxes and notice when one textbox value change then other textbox value not updated. all
textboxes bind to same property. so one's value change should propagate to other textboxes.
this is my code
public class Car : INotifyPropertyChanged
private string _make;
private string _model;
private int _year;
public event PropertyChangedEventHandler PropertyChanged;
public Car(string make, string model, int year)
_make = make;
_model = model;
_year = year;
public string Make
get { return _make; }
set
_make = value;
this.NotifyPropertyChanged("Make");
public string Model
get { return _model; }
set
_model = value;
this.NotifyPropertyChanged("Model");
public int Year
get { return _year; }
set
_year = value;
this.NotifyPropertyChanged("Year");
private void NotifyPropertyChanged(string name)
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(name));
This way i bind
Car carTest;
private void Form1_Load(object sender, EventArgs e)
carTest = new Car("Ford", "Mustang", 1967);
List<Car> ol = new List<Car>();
ol.Add(carTest);
this.textBox1.DataBindings.Add("Text", ol, "Make", true, DataSourceUpdateMode.OnPropertyChanged);
this.textBox2.DataBindings.Add("Text", ol, "Make", true, DataSourceUpdateMode.OnPropertyChanged);
this.textBox3.DataBindings.Add("Text", ol, "Make");
when run the code then Ford was showing as make name but when change value in any textbox then that change is not shown in other textboxes.
the moment i change this line List<Car> ol = new List<Car>(); to
BindingList<Car> ol = new BindingList<Car>(); then code started to work fine.
My Question
1) what is the difference between List and BindingList class ?
2) can't we use List<> for my situation instead of BindingList
3)
this.textBox2.DataBindings.Add("Text", ol, "Make", true, DataSourceUpdateMode.OnPropertyChanged);
this.textBox3.DataBindings.Add("Text", ol, "Make");
see the above code and tell me what is the advantage of using DataSourceUpdateMode.OnPropertyChanged because i have seen if we do not use this code
DataSourceUpdateMode.OnPropertyChanged then also data change is propagated to other textbox when cursor focus change.I would have thought that'd work with List<t>, in fact I think there must be something wrong in your code there. I can't spot it though.
I recommend use of ObservableCollection rather than BindingList.
The default on bindings is that changes are propagated from the target ( view ) to source ( vm ) when the control loses focus.
If you want to do the equivalent to a keydown event handler in a viewmodel then onpropertychanged is the way to go.
You want to avoid creating bindings in code unless you really really have to, it's way easier to put them in xaml.
Even if your ui is dynamic, you can build xaml and use that to create the ui objects:
http://social.technet.microsoft.com/wiki/contents/articles/28797.aspx
The difference between BindingList and List is, literally, iBindingList.
See
https://msdn.microsoft.com/en-us/library/system.componentmodel.ibindinglist%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
What probably isn't very obvious is that BindingList fires an event - iirc itemchanged when properties on objects in it change.
Maybe you did something wrong in your implementation of inotifypropertychanged. I must admit, I can't see anything there though.
You don't really need those magic strings since .net4.5 and you also don't need to explicitly implement inotifypropertychanged you could use:
public event PropertyChangedEventHandler PropertyChanged;
public void RaisePropertyChanged([CallerMemberName] String propertyName = "")
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
As used in this:
https://gallery.technet.microsoft.com/WPF-Dynamic-Fonts-ad3741ca
If you try that sample you can have:
public class FontDetails : INotifyPropertyChanged
or
public class FontDetails
And you can see it still notifies change successfully to both windows.
Most wpf devs will use observablecollection rather than List or bindinglist.
Observablecollection notifies addition or removal of entries. It can be used to notify an entry has changed, but does not detect change of property. You would have to raise the event in code if you want to tell it an item changed.
Hope that helps.
Technet articles: Uneventful MVVM;
All my Technet Articles -
USER EXIT MB_CF001 NOT GETTING TRIGGERED
Hi All,
I am using EXIT_SAPLMBMB_001(MB_CF001)
I want it to be triggered after the document has been saved but its not trigeering..
How can I find out the reason???
Regards
ShilpaHi,
have you checked documentation for that enhancement? That function module is not called after goods movement creation.
The user exit MB_CF001 includes a function module that is called up
immediately before the COMMIT WORK when a goods movement is posted.
How do you test that FM? Some function modules from user exits are called in UPDATE TASK so they just ignore break points. In this case you can use the following trick. You need to enter an infinite loop into your user exit. Then you can connect to this program via transaction SM50 (Program/Session -> Program -> Debugging).
Cheers -
User Exit not getting triggered
Dear all,
we are creating a workflow for PR Release which needed release strategy customization. so we are trying to set the release stratagy by changing the communciation structure CEBAN-USRC1 field.
for this, i had done the following things:
1. SMOD->M06B0005->components->EXIT_SAPLEBND_004->INCLUDE ZXM06U31 (double clicked) wrote few lines of code.
2. CMOD-> created a proj ZMM_PREL->assigned Enhancement M06B0005 under enhancements tab-> EXIT_SAPLEBND_004-> activated all
(User exit, project eveything).
Now my problem is when i create a PR, this user exit does not get triggered at all. I am working on ECC6.0 the same code which i did in Ecc5.0 for my previous client is still working fine.
Can anyone please guide me where i might have gone wrong?
Thank you,
Regards,
LakshmiHi,
HAve u verifiyed that the user-exit u r using is triggered whenever u create ou PR.?
First of all u have to put breakpoints at each and every user-exits provided for that transaction, then check which user exit is getting triggered when u carete ur PR. and thenafter write ur code in this user-exit only.
Reward is useful.
Regards,
Harsha -
User Exit not getting Triggered in Quality Server
Hi,
In FM 'IDOC_INPUT_DESADV' Iam using an User Exit 'EXIT_SAPLEINM_006' ,
which is getting triggered in Development server.But when I moved it to Quality,
The User Exit is not getting triggered.Thou the Exit is assigned to Enhancement
and that in turn is assigned to Project, still the problem persists.
Can any one suggest me what could be the problem.
Regards,
Kiran B.Kiran,
Check the <b>Project</b> of that enhancement is active or not. not the enhancement.
<b><REMOVED BY MODERATOR></b>
Satish
Message was edited by:
Alvaro Tejada Galindo -
Userexit not getting triggered for 0CFM_CLASS_MASTER_DATA_ATTR
Hi Experts,
I have made enhancements to 0CFM_CLASS_MASTER_DATA_ATTR & 0CFM_FI_TRA_ATTR in RSAP0001(EXIT_SAPLRSAP_001). I have set the flag to New Data entry logic(Switch for Datasource feed) to populate the Timedependent attributes in 0CFM_CLASS_MASTER_DATA_ATTR .
I kept the break point in the Userexit and ran RSA3 for the above 2 datasources but the user exit is not getting triggered.
Can you please help why the userexit is not getting triggered?
Thanks,
bwuswer14.Hi,
Thanks for ur post.issue resolved.im keeping the breakpoint in 1st user exit.After keeping the breakpoint in EXIT_SAPLRSAP_002 it got triggered.Closing the thread.
Thanks,
bwuser14 -
User-exit not getting triggered in VA32
Hello Experts,
Iu2019ve a requirement and Iu2019m working on Change Scheduling Agreement u2018t-code VA32u2019. According to requirement I need to capture all header data and data in Sales, Item Overview, Item Detail and Ordering party tabs. Iu2019ve set the break points in almost all the user-exits but only one FM (EXIT_SAPLV45L_002) of exit u2018V45L0001u2019 is getting trigger. Even though other exits/FM has all the tables as import/export parameters which I need but they are not getting triggered. Can anybody please tell me which user-exit / BADI I should use to capture the required data?
Thanks.Hello Experts,
Thanks a lot Vijay for you reply. Iu2019ve seen user exits of MV45AFZZ include and looks like USEREXIT_SAVE_DOCUMENT_PREPARE is the correct user exit. But I havenu2019t use Includes before can you or anybody else please tell me how to write code in include. I know how to search an include in a program but not sure how to add code in the user exit.
Thanks -
User exit not getting triggered while creating the vendor
Hi all,
I wanted to extend the idoc(crermas01) according to my reqiurement.
But when I am trying to create a vendor using the IDOC cremas01 the user exit EXIT_SAPLKD01_001 is not getting triggered.
Can anybody tell me the reason why it is happening so...........
Thanks and regards,
Vinil.Is your Idoc generated after the execution?
Where is you break-point, it is inside EXIT_SAPLKD01_001. Please note FM EXIT_SAPLKD01_001 will not be called unless it is implemented using project (CMOD) and project is active. -
Event not getting triggered for a few users in production
Hi Experts!!
We have a workflow that gets triggered on the event REQUESTCREATED of BUS2089. In production, we see that for a few users the event is getting triggered and even the workflow is. But for a few users, the workflow is not getting triggered. However, we didn't check SWEQADM yet and are waiting to get auth to check the same. But before that, I need your valuable suggestions on this.
When I check SWEL, I cannot see any entries at all. Not even for the successfully processed ones.
Auth objects cannot be a reason, as all the users have same auth. Please suggest me on what else can be the reasons.
Your help is highly appreciable.Hello Srinivas !
Check in SWEQADM to know whether the event is on queue.If so, redeliver it.
If there is no event on queue, check the RFC queue( transaction SWU2 ) and ST22 for possible ABAP dumps.
Call work item list report (transaction SWI1) and check event linkages (transaction SWETYPV )of the users for whom the event is not triggered.Are you using BAdI or user- exit to trigger the workflow ? If so, check whether those are in active state.
Refresh the workflow buffers(transaction SWU_OBUF).Check either of the workflow versions are in active state.
Regards,
S.Suresh -
Due to MODIF ID, SELECT query in START-OF-SELECTION not getting triggered
Dear SAP Gurus,
I'm stuck with this program, where, my program is not being executed, as in, my SELECT query in my event START-OF-SELECTION is not getting triggered. Since i hav used MODIF ID, for SELECT-OPTIONS, even after putting the entries in select-options...................when i click on the execute button, or press F8, the program still goes into the AT SELECTION-SCREEN OUTPUT event..........but i want it to goto START-OF-SELECTION event where my SELECT query is........what should i do??????????????
Please find the notepad file having the code, n exucse me for any selection-texts absence.
Need help from u in this issue.
Thanks in advance.
REPORT ZPPR_CONVSTAT NO STANDARD PAGE HEADING.
INCLUDE ZPPR_CONVSTAT_TOP. " data declaration
INCLUDE ZPPR_CONVSTAT_SEL_CRITERIA. " selection criteria
INCLUDE ZPPR_CONVSTAT_PBO. " event at selection-screen output
INCLUDE ZPPR_CONVSTAT_START_SELECTION. " event start-of-selection
INCLUDE ZPPR_CONVSTAT_F_START_OF_SEL.
*& Include ZPPR_CONVSTAT_TOP
TABLES : VBUK,
VBUP,
VBAK,
VBAP,
VBEP,
VBPA,
TVAK,
EKUB,
LIKP,
LIPS,
MARA,
MAKT,
MARC,
PLAF,
AUFK,
AFKO,
AFPO,
AFVC,
AFVV,
CRHD,
PBIM,
KNA1,
T134,
IOHEADER,
IOITEM.
TYPE-POOLS : slis.
TYPES : BEGIN OF ty_final,
werks TYPE vbap-werks, "Plant
auart TYPE vbak-auart, "Sales Order Doc. type
erdat TYPE vbak-erdat, "Sales Order Creation date
vbeln TYPE vbak-vbeln, "Sales Order No.
posnr TYPE vbap-posnr, "Sales Order Item No.
aedat TYPE vbak-aedat, "Sales Order Change Date
kwmeng TYPE vbap-kwmeng, "Sales Order qty.
vdatu TYPE vbak-vdatu, "Requested Delivery Date
lfimg TYPE lips-lfimg, "Sales Order Delivered Qty.
matnr TYPE vbap-matnr, "Material ID
arktx TYPE vbap-arktx, "Material Description
strgr TYPE marc-strgr, "Planning Strategy
vrkme TYPE vbap-vrkme, "UOM
plnum TYPE plaf-plnum, "Plan Order No.
gsmng TYPE plaf-gsmng, "Plan Order Qty.
auffx TYPE plaf-auffx, "Plan Order Firming Indicator u2013 Qty.
stlfx TYPE plaf-stlfx, "Plan Order Firming Indicator - Component
erdat2 TYPE aufk-erdat, "Production Order Creation Date
aufnr TYPE aufk-aufnr, "Production Order No.
prdqty TYPE afko-gamng, "Production Order qty.
pckqty TYPE lips-lfimg, "Packed Delivered Qty.
psamg TYPE afpo-psamg, "Allotted scrap
igmng TYPE afko-igmng, "Confirmed Yield Qty.
iasmg TYPE afko-iasmg, "Confirmed Scrap Qty
iamng TYPE afpo-iamng, "Expected Yield
wemng TYPE afpo-wemng, "Delivered Qty.
altscrp TYPE c LENGTH 6, "Allotted Scrap %
actscrp TYPE c LENGTH 6, "Actual Scrap %
umrez TYPE afvv-umrez, "Ups (from Prd. ORD)
ups TYPE clobjdat-ausp1, "Ups (from Material Master)
crtnstl TYPE clobjdat-ausp1, "Carton Style
ppopr TYPE clobjdat-ausp1, "Pre-Printing Operation
brdtyp TYPE clobjdat-ausp1, "Board Type
lsdim1 TYPE clobjdat-ausp1, "Layout Size u2013 Dim 1
lsdim2 TYPE clobjdat-ausp1, "Layout Size u2013 Dim 2
lsgsm TYPE clobjdat-ausp1, "GSM
inktyp TYPE clobjdat-ausp1, "Ink Type
foiltyp TYPE clobjdat-ausp1, "Foiling
wintyp TYPE clobjdat-ausp1, "Window Type
lamin TYPE clobjdat-ausp1, "Lamination
fsvrnsh TYPE clobjdat-ausp1, "Front Side Varnish
bsvrnsh TYPE clobjdat-ausp1, "Back Side Varnish
emboss TYPE clobjdat-ausp1, "Embossing
punch TYPE clobjdat-ausp1, "Punching
paste TYPE clobjdat-ausp1, "Pasting
oprno TYPE afvc-vornr, "Operation No.
wrkcntr TYPE crhd-arbpl, "Work Centre
oprtxt TYPE afvc-ltxa1, "Operation Text
oprqty TYPE afvv-mgvrg, "Operation qty.
yield TYPE afvv-lmnga, "Yield
scrap TYPE afvv-xmnga, "Scrap
jobtyp TYPE vbak-augru, "Job Type
prordst TYPE bsvx-sttxt, "Production Order Status
solinst TYPE vbup-lfsta, "Sales Order Line Item Status
sldprty TYPE kna1-name1, "Sold to Party Name
shpprty TYPE kna1-name1, "Ship to Party Name
shpcity TYPE kna1-ort01, "Ship to party - City
END OF ty_final.
TYPES : BEGIN OF ty_vbak,
auart TYPE vbak-auart,
erdat TYPE vbak-erdat, "Doc creation date
vbeln TYPE vbak-vbeln,
aedat TYPE vbak-aedat, "Doc change date
vdatu TYPE vbak-vdatu, "Requested delivery date
kunnr TYPE vbak-kunnr,
augru TYPE vbak-augru, "Job Type
END OF ty_vbak.
TYPES : BEGIN OF ty_vbap,
vbeln TYPE vbap-vbeln,
posnr TYPE vbap-posnr,
werks TYPE vbap-werks,
matnr TYPE vbap-matnr,
arktx TYPE vbap-arktx,
kwmeng TYPE vbap-kwmeng,
vrkme TYPE vbap-vrkme,
END OF ty_vbap.
TYPES : BEGIN OF ty_pbim,
pbdnr TYPE pbim-pbdnr, "Requirements Plan Number
bdzei TYPE pbim-bdzei, "Independent requirements pointer
matnr TYPE pbim-matnr,
werks TYPE pbim-werks,
END OF ty_pbim.
TYPES : BEGIN OF ty_pbhi,
bdzei TYPE pbhi-bdzei, "Independent requirements pointer
pdatu TYPE pbhi-pdatu, "Requirement date
laeda TYPE pbhi-laeda, "Date of Last Change
END OF ty_pbhi.
TYPES : BEGIN OF ty_ekko,
ebeln TYPE ekko-ebeln, "STO doc no
bsart TYPE ekko-bsart,
reswk TYPE ekko-reswk, "Supplying plant
aedat TYPE ekko-aedat, "Doc creation date
END OF ty_ekko.
TYPES : BEGIN OF ty_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat, "Doc change date
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
matnr TYPE ekpo-matnr,
txz01 TYPE ekpo-txz01,
END OF ty_ekpo.
TYPES : BEGIN OF ty_eket,
ebeln TYPE eket-ebeln,
ebelp TYPE eket-ebelp,
eindt TYPE eket-eindt, "Requested delivery date
END OF ty_eket.
TYPES : BEGIN OF ty_lips,
vbeln TYPE lips-vbeln,
posnr TYPE lips-posnr,
vgbel TYPE lips-vgbel,
vgpos TYPE lips-vgpos,
lfimg TYPE lips-lfimg,
END OF ty_lips.
TYPES : BEGIN OF ty_plaf,
plnum TYPE plaf-plnum,
matnr TYPE plaf-matnr,
gsmng TYPE plaf-gsmng,
auffx TYPE plaf-auffx,
stlfx TYPE plaf-stlfx,
kdauf TYPE plaf-kdauf,
kdpos TYPE plaf-kdpos,
pbdnr TYPE plaf-pbdnr,
END OF ty_plaf.
TYPES : BEGIN OF ty_aufk,
aufnr TYPE aufk-aufnr,
erdat TYPE aufk-erdat,
objnr TYPE aufk-objnr,
END OF ty_aufk.
TYPES : BEGIN OF ty_afko,
aufnr TYPE afko-aufnr,
gamng TYPE afko-gamng, "Total order quantity
gasmg TYPE afko-gasmg, "Total scrap quantity in the order
igmng TYPE afko-igmng, "Confirmed Yield Qty
iasmg TYPE afko-iasmg, "Confirmed Scrap Qty
aufpl TYPE afko-aufpl, "Routing number of operations in the order
END OF ty_afko.
TYPES : BEGIN OF ty_afpo,
aufnr TYPE afpo-aufnr,
plnum TYPE afpo-plnum,
matnr TYPE afpo-matnr,
pgmng TYPE afpo-pgmng, "Plan Order Qty
kdauf TYPE afpo-kdauf,
kdpos TYPE afpo-kdpos,
psamg TYPE afpo-psamg, "Allotted scrap
iamng TYPE afpo-iamng, "Expected Yield Variance
wemng TYPE afpo-wemng, "Delivered Qty
END OF ty_afpo.
TYPES : BEGIN OF ty_afvc,
vornr TYPE afvc-vornr,
aufpl TYPE afvc-aufpl, "Routing number of operations in the order
aplzl TYPE afvc-aplzl, "General counter for order
arbid TYPE afvc-arbid, "Object ID of the resource
ltxa1 TYPE afvc-ltxa1,
END OF ty_afvc.
TYPES : BEGIN OF ty_afvv,
aufpl TYPE afvv-aufpl, "Routing number of operations in the order
aplzl TYPE afvv-aplzl, "General counter for order
umrez TYPE afvv-umrez,
mgvrg TYPE afvv-mgvrg,
lmnga TYPE afvv-lmnga,
xmnga TYPE afvv-xmnga,
END OF ty_afvv.
TYPES : BEGIN OF ty_mdvm,
mdkey TYPE mdvm-mdkey,
disst TYPE mdkp-disst,
matnr TYPE mdkp-matnr,
plwrk TYPE mdkp-plwrk,
END OF ty_mdvm.
DATA : it_final TYPE STANDARD TABLE OF ty_final,
it_vbak TYPE STANDARD TABLE OF ty_vbak,
it_vbap TYPE STANDARD TABLE OF ty_vbap,
it_lips TYPE STANDARD TABLE OF ty_lips,
it_pbim TYPE STANDARD TABLE OF ty_pbim,
it_pbhi TYPE STANDARD TABLE OF ty_pbhi,
it_ekko TYPE STANDARD TABLE OF ty_ekko,
it_ekpo TYPE STANDARD TABLE OF ty_ekpo,
it_eket TYPE STANDARD TABLE OF ty_eket,
it_plaf TYPE STANDARD TABLE OF ty_plaf,
it_aufk TYPE STANDARD TABLE OF ty_aufk,
it_afko TYPE STANDARD TABLE OF ty_afko,
it_afpo TYPE STANDARD TABLE OF ty_afpo,
it_afvc TYPE STANDARD TABLE OF ty_afvc,
it_afvv TYPE STANDARD TABLE OF ty_afvv,
it_mdvm TYPE STANDARD TABLE OF ty_mdvm.
DATA : wa_final TYPE ty_final,
wa_vbak TYPE ty_vbak,
wa_vbap TYPE ty_vbap,
wa_lips TYPE ty_lips,
wa_pbim TYPE ty_pbim,
wa_pbhi TYPE ty_pbhi,
wa_ekko TYPE ty_ekko,
wa_ekpo TYPE ty_ekpo,
wa_eket TYPE ty_eket,
wa_plaf TYPE ty_plaf,
wa_aufk TYPE ty_aufk,
wa_afko TYPE ty_afko,
wa_afpo TYPE ty_afpo,
wa_afvc TYPE ty_afvc,
wa_afvv TYPE ty_afvv,
wa_mdvm TYPE ty_mdvm.
DATA : it_object TYPE hum_object_t,
wa_object TYPE hum_object,
it_item TYPE hum_hu_item_t,
wa_item TYPE vepovb,
count1(6) TYPE n.
DATA : gv_objek TYPE ausp-objek. "Put matnr for use in FM u2018CLAF_CLASSIFICATION_OF_OBJECTSu2019
DATA : BEGIN OF it_sclass OCCURS 0.
INCLUDE STRUCTURE sclass.
DATA : END OF it_sclass.
DATA : BEGIN OF it_clobjdat OCCURS 0.
INCLUDE STRUCTURE clobjdat.
DATA : END OF it_clobjdat.
*& Include ZPPR_CONVSTAT_SEL_CRITERIA
SELECTION-SCREEN FOR 'PLANNING STAGE'
SELECTION-SCREEN BEGIN OF BLOCK main WITH FRAME TITLE text-001.
PARAMETERS: mrpntdn RADIOBUTTON GROUP sel DEFAULT 'X' user-command flag,
pldord RADIOBUTTON GROUP sel,
prdord RADIOBUTTON GROUP sel.
SELECTION-SCREEN END OF BLOCK main.
SELECTION-SCREEN FOR 'SELECTION BY PLANT AND PLANT DATA'
SELECTION-SCREEN BEGIN OF BLOCK plant WITH FRAME TITLE text-002.
PARAMETERS : p_werks LIKE ioheader-werks OBLIGATORY DEFAULT '1100' MATCHCODE OBJECT H_T001W.
SELECT-OPTIONS : so_matnr FOR ioitem-matnr MATCHCODE OBJECT MAT1.
PARAMETERS : so_mtart TYPE t134-mtart OBLIGATORY DEFAULT 'ZFIN' MATCHCODE OBJECT H_T134.
SELECT-OPTIONS : so_plnum FOR ioitem-plnum MATCHCODE OBJECT plnum MODIF ID pld,
so_aufnr FOR ioheader-aufnr MATCHCODE OBJECT orde MODIF ID prd.
PARAMETERS : p_prdsta LIKE tj02t-txt04 MODIF ID prd.
SELECTION-SCREEN END OF BLOCK plant.
SELECTION-SCREEN FOR 'SELECTION BY REQUIREMENT TYPE'
SELECTION-SCREEN BEGIN OF BLOCK reqtyp WITH FRAME TITLE text-003.
PARAMETERS : cb_so TYPE AUSWL_EB AS CHECKBOX USER-COMMAND flag,
cb_sto TYPE AUSWL_EB AS CHECKBOX USER-COMMAND flag,
cb_pir TYPE AUSWL_EB AS CHECKBOX USER-COMMAND flag.
SELECTION-SCREEN END OF BLOCK reqtyp.
SELECTION-SCREEN FOR 'SELECTION BY DATE AND REQUIREMENT TYPE NOS'
SELECTION-SCREEN BEGIN OF BLOCK dtreqtypno WITH FRAME TITLE text-004.
SELECT-OPTIONS : so_crtdt FOR vbak-erdat MODIF ID gen,
so_vbeln FOR vbap-vbeln MATCHCODE OBJECT WTY_F4_VBAP MODIF ID rso,
so_posnr FOR vbap-posnr MODIF ID rso,
so_ebeln FOR ekub-ebeln MATCHCODE OBJECT MEKKM MODIF ID rst,
so_ebelp FOR ekub-ebelp MODIF ID rst,
so_pbdnr FOR pbim-pbdnr MODIF ID rpi,
so_reqdt FOR vbep-edatu MODIF ID gen.
SELECTION-SCREEN END OF BLOCK dtreqtypno.
SELECTION-SCREEN FOR 'SELECTION BY OTHER PARAMETERS'
SELECTION-SCREEN BEGIN OF BLOCK othrparam WITH FRAME TITLE text-005.
SELECT-OPTIONS : so_kunnr FOR kna1-kunnr MATCHCODE OBJECT debi MODIF ID rso,
so_auart FOR tvak-auart MATCHCODE OBJECT H_TVAK MODIF ID rso,
so_lfsta FOR vbup-lfsta MODIF ID rso.
SELECTION-SCREEN END OF BLOCK othrparam.
*& Include ZPPR_CONVSTAT_PBO
*& Event AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
IF mrpntdn = 'X'.
LOOP AT SCREEN.
IF ( screen-group1 = 'PLD' OR screen-group1 = 'PRD' ).
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF pldord = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'PLD'.
screen-intensified = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'PRD'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF prdord = 'X'.
LOOP AT SCREEN.
IF ( screen-group1 = 'PLD' OR screen-group1 = 'PRD' ).
screen-intensified = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF ( cb_so = ' ' AND cb_sto = ' ' AND cb_pir = ' ' ).
LOOP AT SCREEN.
IF ( screen-group1 = 'GEN'
OR screen-group1 = 'RSO'
OR screen-group1 = 'RST'
OR screen-group1 = 'RPI' ).
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF cb_so = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'RSO'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
IF cb_sto = ' '.
LOOP AT SCREEN.
IF screen-group1 = 'RST'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF cb_pir = ' '.
LOOP AT SCREEN.
IF screen-group1 = 'RPI'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ELSEIF cb_sto = 'X'.
IF cb_so = ' '.
LOOP AT SCREEN.
IF screen-group1 = 'RSO'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF cb_pir = ' '.
LOOP AT SCREEN.
IF screen-group1 = 'RPI'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ELSEIF cb_pir = 'X'.
IF cb_so = ' '.
LOOP AT SCREEN.
IF screen-group1 = 'RSO'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF cb_sto = ' '.
LOOP AT SCREEN.
IF screen-group1 = 'RST'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
*& Include ZPPR_CONVSTAT_START_SELECTION
*& Event START-OF-SELECTION
IF mrpntdn = 'X'.
PERFORM start_of_selection_mrpntdn.
ELSEIF pldord = 'X'.
PERFORM start_of_selection_pldord.
ELSEIF prdord = 'X'.
PERFORM start_of_selection_prdord.
ENDIF.
*& Include ZPPR_CONVSTAT_F_START_OF_SEL
*& Form START_OF_SELECTION
Subroutine for MRP NOT DONE
FORM start_of_selection_mrpntdn.
SELECT mdkey INTO TABLE it_mdvm FROM mdvm
WHERE GSAEN = 'X'
AND AKKEN = 'X'.
IF sy-subrc = 0.
LOOP AT it_mdvm INTO wa_mdvm.
wa_mdvm-disst = wa_mdvm-mdkey(3).
wa_mdvm-matnr = wa_mdvm-mdkey+3(18).
wa_mdvm-plwrk = wa_mdvm-mdkey+21(4).
MODIFY it_mdvm FROM wa_mdvm INDEX sy-index TRANSPORTING disst matnr plwrk.
ENDLOOP.
ENDIF.
ENDFORM.
*& Form START_OF_SELECTION
Subroutine for PLAN ORDER CREATED
FORM start_of_selection_pldord.
ENDFORM.
*& Form START_OF_SELECTION for PRODUCTION ORDER CREATED
Subroutine for PRODUCTION ORDER CREATED
FORM start_of_selection_prdord.
ENDFORM.You need to mention START-OF-SELECTION explicitly in your code.
Change your code as below:
*& Event START-OF-SELECTION
START-OF-SELECTION.
IF mrpntdn = 'X'. -
Urgent IDOC - EXIT_SAPLLMDE_002 not getting triggered.
I am doing an inbound idoc on message type WMMXY goods movement.
The idoc is sucessfully getting posted when tested through we19.
But the user exit EXIT_SAPLLMDE_002 where i am doing an enhancement is not getting triggered when the idoc is posted.
I have activated the exit functional module, the project in CMOD is also activated.
Some one pls help me .. if u have its document pls post it to me.Hi,
Please refer to this documentation of user-exit; may be of some help for you.
You can use this user exit to influence the processing of IDOCs of the
message type WMMBXY (goods movements) that are sent to SAP from external
systems via the MM-MOB or WM-LSR interfaces. You can also access
customer-specific processing in this case.
Call transaction and other important requirements
The user exit is performed in the function module that processes the
IDOCs of the message type WMMBXY, after the IDOC is withdrawn and
checked but before direct processing in the application has been
initiated. (That is, the data for the goods movement has already been
determined and edited, but the function module for updating this has not
yet been accessed. The standard function module for processing the
message type WMMBXY is called L_IDOC_INPUT_WMMBXY. The IDOC is processed
in an update task, which means that the source code is also executed in
the update.
If an error arises, then messages should not be issued since processing
is being carried out in the background and the result of processing must
always be returned to the ALE interface. For this reason language
elements such as MESSAGE, COMMIT WORK, LEAVE and the like should not be
used. If errors that should be passed on to the ALE interface or that
affect the result of processing are found in the user exit, you should
also use the user exit MWMIDI07(EXIT_SAPLLMDE_001) since it alone can be
used to take your errors into account (see documentation of the user
exit).
Parameters and options
The user exit in the program is the function module EXIT_SAPLLMDE_002.
In order to be able to use it, you must first create Include zxlidu10
and activate the enhancement by means of transaction CMOD. As
parameters, you can use the following data:
o Goods movement data already determined from the received IDOC:
- Transaction code that is given along with the application
function module (see interface description (import parameter
X_TCODE).
- Indicator: post only if all items o.k. (import parameter X_XALLP
). This indicator must be set by default, to enable IDOC error
processing.
- Indicator: Reset all tables (as primary call) (import parameter
X_XALLR). This indicator is not set by default to enable the
processing of several IDOCs. Normally you will not change these
two indicators.
- Goods movement items table (table parameter T_IMSEG)
o Received IDOC data:
- IDOC control record (import parameter I_IDOC_CONTROL)
- IDOC data records (table parameter T_IDOC_DATA)
This user exit can be used to:
o Influence the determined data for the goods movements. All data can
be changed in this case.
o Analyze and process data that is transferred using customer-specific
segments.
o Access additional activities.
Examples
A number of potential applications are described below.
A number of potential applications are described below.
o You want to inform a user by mail when the goods movements of
certain vendors or customers take place.
o You want to start your own label printout, for example at goods
receipt.
o You want to update your own tables, for example statistical data.
o You want to analyze a missing parts table at goods receipt and
redirect the goods receipt correspondingly.
Reward points if helpful.
Regards,
Pankaj Sharma
Maybe you are looking for
-
HP LaserJet Enterprise 500 551dn - where did the drivers go?
I go to the download page to download the drivers for this 551dn. I download all windows 7, 8, 8.1, 2008, 2012, so that i can put them on my print server. I downloaded them from here.. <http>//h20564.www2.hp.com/hpsc/swd/public/readIndex?sp4ts.oid=
-
USB drive locks up ibook running 10.3.9
Hi All, I didn't know if this question was more appropriate for this forum or the ibook forum, as I do not know if this is a SW or HW problem at this point. I decided to post here. I have a G4 1.2Ghz 12" ibook running 10.3.9, and I recently purchased
-
Maintain Subscreen for Coding Block
Dear Guys I have a requirement to create a subscreen for a FI transaction. I know that this can be done using OXK1. I have already created a subscreen. But I want to know that how can I link that subscreen with a particular Transaction. e.g I have ma
-
Is there auto scrolling in iBook?
Back in the day I had a palm pilot with an ereader. It had autscrolling which was the best feature in ebooks. I haven't found this in any of the iBooks or kindle readers yet. I'm surprised.
-
How to edit XML parsed data and save on iPhone app
Hi, How to edit and XML retrieved data that is displayed on an iPhone app and save again in the same XML file using iPhone SDK. In other words I want to change the XML file data or edit and save. Thnx in advance. Regards Amit