HELP!a class item in BOMs for select mat. components in a configurable GMTL
Hello SAP colleague,
Does anyone of you know what be used as a class item in BOMs for PM?
1. I create a class as the components in a configurable bill of material of the category Assembly
2. I create Configurable General Maintenance Task List and assign a material of the category Assembly to the general maintenance task list in the task list header ?
3. Unfortunately, I can't select the material components of a class item in BOMs and assign them to the task list (Msg. Item category K is not defined as a material component).
4. If I create a maintenance order and assign a configurable general maintenance task list to it, the system recognize that the general maintenance task list is assigned to a configuration profile. It calls up characteristic valuation and only selects the relevant operations for the order from the super task list, based on the object dependencies that I specified. But system don't select the material components of a class item in BOMs.
May I use a class item in BOMs for select material components in a configurable GMTL ?
Many thanks for your answer.
Mike
Edited by: M.A. Bragin on Nov 8, 2010 1:18 PM
If you have a list item where you have:
Display A value 1
Display B value 2
Display C value 3
Display D value 4
If want to initial the value of the item to be A, you can set the initial value of the item to 1 in the property pane.
Otherwise in an initialisation triger have
:block.list_item := 1;
HTH
Tony
Similar Messages
-
Sub-items not supported for selected item(s) error in LSMW
Hi gurus,
Am working on BOM's data load via LSMW. Most of the item are stock items (L) but some of the items i am loading are Text items (T). Because of the customizing done in OS13 (that can't be changed apparently), the LSMW executed in foreground gives the message "Sub-items not supported for selected item(s)" (only as information, green message) and the dataload IS STOPPED.
Is there a way to :
-> change OS13 (allow sub-items for text items) : When i try i have an error message.
-> or to force LSMW program no to go on the sub items screens (this way the program does not stop and the BOM is created)
Thanks in advance for your answers,
OlivierFound the solution my self all relations between dataload file and sub-items structure had to be suppressed in LSMW.
-
I'm using Class Item (Item Cat: K) in my BOM, and I have doubts in the followings:
1. Can a class item be replaced by more than one material?
2. When I enter the characteristics in the header material, if there are more than one materials suits that, the system always pick the first one. Can I do the setting like: the system would prompt for user to choose among those suitable materials?
Pls kindly give some lights on that. Thank you.
KenLet me mention my situation in details:
Characteristic: ProductCat
Possible value: A / B
Class: Class200
only one characteristic ProductCat assigned
Three material assigned to Class200
SubItem1 (ProductCat = A)
SubItem2 (ProductCat = A)
SubItem3 (ProductCat = B)
BOM:
MainItem
-- Class Item K Class200
When I explode in t-code CU50,
Enter ProductCat B in MainItem, SubItem 3 is chosen.
Enter ProdcutCat A in MainItem, SubItem 1 is chosen. (Why not SubItem2 ???)
I can use "Find Object" button, then "Find in initial class" to choose SubItem2. The SubItem1 is then replaced by SubItem2. That's what I need.
Can I do the same when creating QT in VA21?
During the item cat BOM explosion in VA21, SubItem1 is always selected. I want to let user to choose SubItem2.
Pls give me some advice. Thanks a lot!
Ken -
Line Item text diplay for different wage components
Hi Experts,
My Client wants the exact narration (Monthwise) in line item text for the salary components which are posted to accounts. If I am using FB03 then the system is allowing me to maintain it manually, but it's not possible for headwise different salary components for 20,000 employees (Which is the manpower strength of the client) is there any other workaround for it? Is it possible that the monthwise narration will float for the wage components through the respective module?
Please help in this regards.Hi Experts,
My Client wants the exact narration (Monthwise) in line item text for the salary components which are posted to accounts. If I am using FB03 then the system is allowing me to maintain it manually, but it's not possible for headwise different salary components for 20,000 employees (Which is the manpower strength of the client) is there any other workaround for it? Is it possible that the monthwise narration will float for the wage components through the respective module?
Please help in this regards. -
Need help with moving items betwen 2 netui select boxes
Hi,
I have 2 multiple select boxes for possible courses and assigned courses. I need a way to implement move of option items from one box to another using buttons. The user can select courses from one box and move them to another. I am not sure how I would do that with netui select boxes and a pageflow method. If I use javascript, i get all kinds of errors even though I am trying to use the tagid. If validation fails, then the select boxes dont save the updated content.
Please help.
BinduAhmed_Arafa wrote:
hii all,
i have a list item.. in this list item i have a two list item value
1- visa ,list elements visa
2- cash ,list elements cash
i need when user select visa from list item then appear text item (visa_number)
i change item visa_number visible to no
that's my code i write it
trigger
when new-block-instance
IF :RESERVATION.PAY_METHOD = 'visa'THEN
SET_ITEM_PROPERTY('RESERVATION.VISA_NUMBER',VISIBLE,PROPERTY_TRUE);
ELSE
SET_ITEM_PROPERTY('RESERVATION.VISA_NUMBER',VISIBLE,PROPERTY_FALSE);
END IF;**My problem is when i click on cash in the first nothing happen and this right
when i click to visa second nothing happen this not right
**when i click on visa first every thing is working
i need when i click on visa any time item appear and when i would like to click to cash.. visa item is disappearWrite your code in When-List-Change trigger at list_item.
Hope this will help you. -
Help required: class assignment and values for functional location
Hi All,
My requirement is to get classification data for a functional location as in IL03.
Can any one let me know where in the standard program are they getting the assigned classes
and class values. So that I can use the same logic.
Thanks.FM BAPI_OBJCL_GETDETAIL
OBJECTKEY ?0100000000000011643
OBJECTTABLE IFLOT
CLASSNUM ZPMI_BLDG
CLASSTYPE 003
KEYDATE 29.07.2009
UNVALUATED_CHARS
LANGUAGE EN
Cheers! -
How to restrict the values for selection in the search help..
hi,
i have a requirement regarding screen programming. i have added a i/o field in a screen and i linked a search help for that field.
i used the standard search help it holds some 15 values for selection...
when i click on the search help i m getting some 15 values for selection. but i dont need all the 15 values. i need only 4 values for selection..can any one help me regarding this...
waiting for ur reply...
Uday.
Edited by: uday13 on May 31, 2010 9:17 AMHello,
Refer the below code and you can provide your own search help to a parameter depending on the value in another parameter:-
PARAMETERS : p_belnr TYPE belnr,
p_bukrs TYPE bukrs.
DATA : BEGIN OF itab OCCURS 0,
bukrs TYPE bukrs,
END OF itab.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
PERFORM f4_bukrs_help USING p_bukrs.
*& Form f4_bukrs_help
FORM f4_bukrs_help USING p_bukrs.
DATA : itab TYPE STANDARD TABLE OF it WITH HEADER LINE,
tb_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE,
v_belnr TYPE belnr.
CLEAR: tb_dynpfields.
REFRESH: tb_dynpfields.
MOVE 'P_BELNR' TO tb_dynpfields-fieldname.
APPEND tb_dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = 'Z_F4' "program name
dynumb = '1000' "screen number
TABLES
dynpfields = tb_dynpfields
IF sy-subrc NE 0.
ENDIF.
READ TABLE tb_dynpfields INDEX 1.
IF sy-subrc EQ 0.
v_belnr = tb_dynpfields-fieldvalue.
ENDIF.
SELECT bukrs from <db_table> INTO TABLE itab WHERE belnr = v_belnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BURKS' "internal table field
dynpprog = 'Z_F4' "program name
dynpnr = '1000' "screen number
dynprofield = 'P_BUKRS' "screen field name
value_org = 'S'
TABLES
value_tab = itab "internal table
IF sy-subrc NE 0.
ENDIF.
ENDFORM. " f4_bukrs_help
Hope this helps you.
Regards,
Tarun -
Hi,
Need help solving a Task that returns a Task<IEnumerable<Writing>> so I can fill ObservableCollection<ViewModels.IWritingItemViewModel> Writings for my
Design Time Data Page:
<d:Page.DataContext>
<designTimeData:MainPageViewModel />
</d:Page.DataContext>
My constructor does this:
public MainPageViewModel()
var writings = this.GetGroupsAsync();
this.Writings = new ObservableCollection<ViewModels.IWritingItemViewModel>();
var viewmodels = writings.Select((x, i) => new WritingItemViewModel
Writing = x,
VariableItemSize = (i == 0) ? Common.VariableItemSizes.Writings : Common.VariableItemSizes.Normal,
My var writings = this.GetGroupsAsync(); is:
public async Task<IEnumerable<Writing>> GetGroupsAsync()
await this.GetMenuDataAsync();
return this.Groups;
which in turn gets data from:
private async Task GetMenuDataAsync()
Uri dataUri = new Uri("ms-appx:///DesignTimeData/MenuData.json");
StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(dataUri);
string jsonText = await FileIO.ReadTextAsync(file);
JsonObject jsonObject = JsonObject.Parse(jsonText);
JsonArray jsonArray = jsonObject["Groups"].GetArray();
foreach (JsonValue groupValue in jsonArray)
JsonObject groupObject = groupValue.GetObject();
Writing group = new Writing(
groupObject["UniqueId"].GetString(),
groupObject["IsHeaderInteractive"].GetBoolean(),
groupObject["ViewType"].GetString(),
groupObject["ModelType"].GetString(),
groupObject["Page"].GetString(),
groupObject["Title"].GetString(),
groupObject["Subtitle"].GetString(),
groupObject["ImagePath"].GetString(),
groupObject["Description"].GetString(),
groupObject["GroupId"].GetString()
foreach (JsonValue itemValue in groupObject["WritingMenus"].GetArray())
JsonObject itemObject = itemValue.GetObject();
group.WritingMenus.Add(new WritingMenu(
itemObject["UniqueId"].GetString(),
itemObject["Page"].GetString(),
itemObject["Title"].GetString(),
itemObject["Subtitle"].GetString(),
itemObject["ImagePath"].GetString(),
itemObject["Description"].GetString(),
itemObject["Content"].GetString(),
itemObject["WritingsId"].GetString(),
itemObject["GroupId"].GetString(),
Convert.ToInt32(itemObject["Item"].ValueType)
this.Groups.Add(group);
and I get this Error:
Error 5 'System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<App1.DesignTimeData.Writing>>'
does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type
'System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<App1.DesignTimeData.Writing>>'
could be found (are you missing a using directive or an assembly reference?)
I'm creating collections of:
public interface IWritingItemViewModel : Common.IVariableSizedItem
Models.Writing Writing { get; set; }
and my class for creating data is:
public class Writing
public Writing(
string uniqueId,
bool isHeaderInteractive,
string templateType,
string viewModelType,
string page,
string title,
string subtitle,
string imagePath,
string description,
string groupId
this.UniqueId = uniqueId;
this.IsHeaderInteractive = isHeaderInteractive;
this.TemplateType = templateType;
this.ViewModelType = viewModelType;
this.Page = page;
this.Title = title;
this.Subtitle = subtitle;
this.ImagePath = imagePath;
this.Description = description;
this.GroupId = groupId;
this.WritingMenus = new ObservableCollection<WritingMenu>();
public string UniqueId { get; private set; }
public bool IsHeaderInteractive { get; private set; }
public string TemplateType { get; private set; }
public string ViewModelType { get; private set; }
public string Page { get; private set; }
public string Title { get; private set; }
public string Subtitle { get; private set; }
public string ImagePath { get; private set; }
public string Description { get; private set; }
public string GroupId { get; private set; }
public virtual ObservableCollection<WritingMenu> WritingMenus { get; private set; }
How can I solve or successfully complete this code?
Thanks!...
Code is like a box of chocolates!...I looked into your error message again, I found something interesting:
Error 5
'System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<App1.DesignTimeData.Writing>>'
does not contain a definition
for 'Select'
and no extension method
'Select' accepting a first argument of type
'System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<App1.DesignTimeData.Writing>>'
could be found (are you missing a
using directive or an assembly reference?)
That means: Task does not contain the definition for Select. This was reasonable, Task does not inherit IEnumerable interface.
var viewmodels = writings.Select((x, i) => new WritingItemViewModel
Writing = x,
VariableItemSize = (i == 0) ? Common.VariableItemSizes.Writings : Common.VariableItemSizes.Normal,
public async Task<IEnumerable<Writing>> GetGroupsAsync()
You need get the IEnumerable<Writing> for Select use. See this for more information:
How to: Return a Value from a Task
--James
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Item availability for selected items and directly create the delivery
Hi All,
For a very big sales order ..lets say having 700 line items ...is there any convenient way to create the delivery for selected items ..e.g. 30-40 line items rather going and selecting the line items then doing the item availability.
do you have any LSMW format by which we can do the item availability for selected items and directly create the delivery.
kindly Guide me..
With Regards
Azeez.MohdHi ,
There is no stand way of doing it . You need to take help of abaper to do this :
1. Create a t code where if you give sale order number , it displays a report with all the items with a check box near to it as we see in SE16 .
2. This report could be best in ALV form where users can do "ctr+f" and search only the required materials then select those lines and press a button on the top of report .
3. Once the button is pressed , program will run vL01n ( create delv in backgrnd) in a BDC form . At time of delev creating , the bdc program in backgrnd uses only those items which were selected by user and not the other items .
4. Program will create a delv using a BDC in background and return the delv number for user to view tht.
U can also try using FM : RV_DELIVERY_CREATE to create delv in backgrnd after user selection if BDC is getting tricky.
Hopefully ,this shuld work and will be a easy process for the customers.
Let us know the outcome .. .
B O L ..
Hope this Helps !!! -
Sourcing: Propose sources for selected items
Hi
I am running SRM 7.0 in classic scenario - for now in a demo environment. I try to figure out how the sourcing work if I have contracts.
I creates a central service contract in SRM. This is not replicated to backend at the moment but do it have to be replicated to backend to be proposed as source for my shopping cart in the sourcing cockpit?
I have created a contract in backend (and only in backend) and this is visible in "Propose sources for selected items"
Another issue I have is in the following process.
1. A user creates a SC with a service item (text item)
2. This goes to Purchasers worklist
3. Purchaser creates RFx and select bidders
4. The bidders respond
5. The Purchaser select the best offer and creates a contract.
6. The SC is not possible to order anymore so the Purchaser creates a copy of the original SC (on behalf of the user who create the SC in the first place).
7. I expect that the contract I created in bullet 5 would be proposed as source of supply in the new SC but it isn´t :-(
I therefore wondering if it is because the contracts is not replicated to backend at the moment?
Note:
I order a text service item and I have filled the Supplier Part number in both the contract and SC but this do not help.
Hope anyone can help meHello,
If you are using classic scenario, only backend contracts will be proposed as SOS.
This means that if you create a central contract in SRM, it should be replicated to ECC in order to be used as source of supply.
SRM contracts can be used as SOS only in case of extended classic and local scenarios.
Regards,
Ricardo -
ALV with classes for selected fields
Hi ALL,
Please can anybody will give the example code for
<b>ALV with classes for selected fields</b> from database table .Hi,
*& Report YR_TANS_ALVTEST *
REPORT yr_tans_alvtest .
INCLUDE ya_yr_tans_alvtest_top.
TABLES yttans_test.
DATA itab LIKE yttans_test OCCURS 0.
DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid .
DATA gc_custom_control_name TYPE scrfname.
gc_custom_control_name = 'CC_ALV'.
DATA gr_ccontainer TYPE REF TO cl_gui_custom_container .
DATA gt_fieldcat TYPE lvc_t_fcat .
DATA gs_layout TYPE lvc_s_layo .
data wa_itab like line of itab.
TYPES : BEGIN OF ty_help,
roll_no LIKE yttans_test-roll_no,
name LIKE yttans_test-name,
END OF ty_help.
DATA: git_returntab TYPE TABLE OF ddshretval INITIAL SIZE 0.
CLASS lcl_event_handler DEFINITION
CLASS lcl_event_handler DEFINITION .
PUBLIC SECTION .
METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid IMPORTING
e_row e_column es_row_no.
PRIVATE SECTION.
ENDCLASS. "lcl_event_handler DEFINITION
DATA gr_event_handler TYPE REF TO lcl_event_handler .
*& Form handle_double_click
text
-->I_ROW text
-->I_COLUMN text
-->IS_ROW_NO text
FORM handle_double_click USING i_row TYPE lvc_s_row i_column TYPE
lvc_s_col is_row_no TYPE lvc_s_roid.
leave to list-processing.
read table itab index is_row_no-row_id into wa_itab.
write:/ 'Roll no: ', wa_itab-roll_no, /'Name: ', wa_itab-name,
/'Marks: ', wa_itab-marks.
LEAVE SCREEN.
ENDFORM . "handle_double_click
CLASS lcl_event_handler IMPLEMENTATION
CLASS lcl_event_handler IMPLEMENTATION .
*--Handle Double Click
METHOD handle_double_click .
PERFORM handle_double_click USING e_row e_column es_row_no .
ENDMETHOD . "lcl_event_handler
ENDCLASS . "lcl_event_handler IMPLEMENTATION
SELECT-OPTIONS roll FOR yttans_test-roll_no .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR roll-low.
DATA: lit_help TYPE TABLE OF ty_help.
DATA: wa_returntab LIKE LINE OF git_returntab.
SELECT roll_no name INTO TABLE lit_help FROM yttans_test.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ROLL_NO'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'roll-low'
value_org = 'S'
TABLES
value_tab = lit_help
return_tab = git_returntab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE git_returntab INTO wa_returntab INDEX 1.
roll-low = wa_returntab-fieldval.
AT SELECTION-SCREEN.
SELECT * FROM yttans_test INTO TABLE itab WHERE roll_no IN roll.
START-OF-SELECTION.
CREATE OBJECT gr_event_handler .
CALL SCREEN '9000'.
*& Module STATUS_9000 OUTPUT
text
MODULE status_9000 OUTPUT.
SET PF-STATUS 'STATUS_9000'.
SET TITLEBAR 'TITLE_9000'.
ENDMODULE. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9000 INPUT
text
MODULE user_command_9000 INPUT.
DATA: ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'BACK' OR '%EX' OR 'RW'.
CALL METHOD gr_ccontainer->free.
CALL METHOD cl_gui_cfw=>flush.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*& Module alv_display_9000 OUTPUT
text
MODULE alv_display_9000 OUTPUT.
PERFORM display_alv .
ENDMODULE. " alv_display_9000 OUTPUT
*& Form display_alv
text
FORM display_alv .
IF gr_alvgrid IS INITIAL .
CREATE OBJECT gr_ccontainer
EXPORTING
PARENT =
container_name = gc_custom_control_name
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT gr_alvgrid
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
i_parent = gr_ccontainer
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SET HANDLER gr_event_handler->handle_double_click FOR gr_alvgrid .
PERFORM prepare_field_catalog CHANGING gt_fieldcat .
PERFORM prepare_layout CHANGING gs_layout .
CALL METHOD gr_alvgrid->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
is_layout = gs_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = itab[]
it_fieldcatalog = gt_fieldcat
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4
IF sy-subrc <> 0.
LEAVE TO LIST-PROCESSING.
WRITE 'error'.
ENDIF.
ELSE.
CALL METHOD gr_alvgrid->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
finished = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. "display_alv
*& Form prepare_field_catalog
text
<--P_GT_FIELDCAT text
FORM prepare_field_catalog CHANGING p_gt_fieldcat TYPE lvc_t_fcat .
DATA ls_fcat TYPE lvc_s_fcat .
ls_fcat-fieldname = 'ROLL_NO'.
ls_fcat-coltext = 'ROLL No.'.
APPEND ls_fcat TO p_gt_fieldcat.
ls_fcat-fieldname = 'NAME'.
ls_fcat-coltext = 'NAME'.
APPEND ls_fcat TO p_gt_fieldcat.
ls_fcat-fieldname = 'MARKS'.
ls_fcat-coltext = 'MARKS'.
APPEND ls_fcat TO p_gt_fieldcat.
ENDFORM. " prepare_field_catalog
*& Form prepare_layout
text
<--P_GS_LAYOUT text
FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
ps_layout-zebra = 'X' .
ps_layout-grid_title = 'Students Details'.
ps_layout-smalltitle = 'X' .
ENDFORM. " prepare_layout
Regards,
Tanveer.
Mark helpful answers
Message was edited by: Tanveer Shaikh -
OPEN out_cur FOR SELECT exception handling help
Here is the stored procedure for reading a data based on the input, if no data then return null ref cursor and proper error message.
I am not sure, i am handling proper exception handling ? Please help me to complete this item.
Thanks.
PROCEDURE testing
module IN VARCHAR2,
module_id IN VARCHAR2,
out_cur OUT SYS_REFCURSOR,
out_error_no OUT NUMBER
BEGIN
out_error_no := 0;
CASE
WHEN module = 'a' AND module_id = 'b' THEN
BEGIN
OPEN out_cur FOR
SELECT id,
mime_type,
file_length,
file_name ,
uploadeddate,
created_user ,
status_name
FROM l_table_cnt
WHERE id = module_id;
EXCEPTION
WHEN OTHERS THEN
OPEN out_cur_file_cursor FOR
SELECT
NULL id,
NULL mime_type,
NULL file_length,
NULL file_name,
NULL uploadeddate,
NULL created_user,
NULL status_name
FROM dual
WHERE 1= 0;
out_error_no := 2;
RAISE_APPLICATION_ERROR(-20024,'No Document ');
END;Venkadesh wrote:
The correct way is to just open the ref cursor and pass it back and then the receiving code that is going to use that cursor handles whether there is any code in it or not. can you please explain with simple exampleIs it really that difficult?
Ok...
Here's the procedure to return a ref cursor...
SQL> ed
Wrote file afiedt.buf
1 create or replace procedure get_rc(p_deptno in number, p_rc out sys_refcursor) is
2 begin
3 open p_rc for 'select * from emp where deptno = :1' using p_deptno;
4* end;
SQL> /
Procedure created.Now we have some application that wants to consume a ref cursor... in this case the application is SQL*Plus, but it could be Java or .NET etc.
It declares it's local reference to the ref cursor...
SQL> var r refcursor;then calls the procedure to get a ref cursor reference assigned...
SQL> exec get_rc(10, :r);
PL/SQL procedure successfully completed.Now, the application itself determines if there is any data when it comes to actually perform the fetches on it...
SQL> print r;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 09-JUN-1981 00:00:00 2450 10
7839 KING PRESIDENT 17-NOV-1981 00:00:00 5000 10
7934 MILLER CLERK 7782 23-JAN-1982 00:00:00 1300 10in the above case it had data, so it displayed it.
So what if there isn't any data...
SQL> exec get_rc(90, :r);
PL/SQL procedure successfully completed.
SQL> print r;
no rows selected
SQL>SQL*Plus (the application that calls the procedure) is the one that has determined that there was not data when it came to fetch it (using the print statement in this case). And when it found there was no data it handled it itself (in this case printing the message "no rows returned").
The procedure doesn't have to do any overhead of determining if there is data going to be returned or not, because it's not it's responsibility and completely unnecessary. The calling application can easily determine if there is data or not when it starts to try and fetch it. -
BAPI to create Purchase Requisition for selective BOM Material
Dear Experts,
I need ur help, Actually I am developing a module Pool prg to create Purchase Requisition for selective Bom Material .
Actually, standard T.Code (ME21N) create PR for a multiple BOM Materia lwhich are used to create a prepared material. But my requirement is PR should be generate for selective BOM material .
Multiple BOM Material is used to prepared a complete Material .
I have checked a particular BOM Material, for this matrial Purchase Requisition should be genrate.
Please suggest me the related code and Bapi which helps me .
Thanks & Regards,
SwapnikaHi
you can Use BAPI BAPI_REQUISITION_CREATE
Hope Its help You.
Regards
Ajit -
Create a black border for select list item
Need help on creating border on a select list item.
I tried using style ="border:1px solid black"; in HTML Form Element Attribute , but its not working for select list item, though it works on text field item.
NileshBrowsers and versions? (Always supply this information when discussing presentation and UI problem.)
If it's IE, then this is not possible (at least up until IE7 which is all I can test on at present).
(As HTML, CSS and JavaScript exist outside of APEX, you should search more widely than just OTN when looking for information on these topics.) -
PGI for both main and sub items (Sales BOM)
Hello SD friends,
I'm trying to map some BOM scenario.
Only main item should be relevant for princing.
Here's what I've done :
1. Create sales BOM via CS01
2. Maintain item category group ERLA for main item and NORM for sub item MM01
3. Maintain item category TAQ for main item and TAE for sub item VOV4
When I wanna do PGI, system creates material document only for main item.
Which means that PGI has not been done for sub items.
Is there any way to make PGI possible for both main and sub items ??
Regards,
Bahia.Can you clear, that why you want to issue both Main item/Sub Item, where your pricing is @ main item level.
in Main item level Pricing, Main item itself includes components. Once you issue the main item. from Inventory this main item wil be reduced.
Eg: In Case of Main Item- Computer (Assume Components - Monitor , Keyboard , CPU & Mouse)
Price for Computer - $1200. Component prices individually- $300 , $100, $700, $100 - These prices applicable only when you sell as BOM at Subitem level Pricing Or Seperately )-
In SO: - Order Computer (System explodes Components to verify,which are the subitems consists in Main Item)
DEL:- Components will be copied in Delivery , but not for dispatch (Sch Line Cat:CT has these controls)
Inv: Only Main item will be displayed for print.
NOTE: for your requirement, you can change the Schline Category from CT - CN- which is relevant for delivery with movement type i601 -in SO. Then you can dispatch components & these components will not copied into Invoice ,as they are not relevant for billing.
If you want CN has to determined automatically, maintain Schline Category determination accordingly.
Hope it helps,
Any info, please revert
Maybe you are looking for
-
So my wrt1900ac has been blinking white starting tonight. I logged into the router and did a router reboot. That didnt work, then I rebooted my modem still didnt work. After all that I did a factory reset to my wrt1900ac which was a big mistake cause
-
TabIndex in many Components?
I have a JFrame with many components (TextFields, JCheckBox, radioButtons, etc), and its are in many Panels with diferents Layouts. How can I change the tabindex (the orden in wich the components are getting the focus when I Press de key Tab)?. Thank
-
Hi MacTribe, I use Vidi to import video into iMovie 5. When it's in the panel, I cut the video to trim out unwanted parts. Ideally, this should leave me with cuts that I want. Unfortunately, it doesn't work that way. Instead I actually have links to
-
Batch Input at transaction AS02
When I try to do a batch input on transaction AS02, it returns to me an error: Runtime error GETWA_NOT_ASSIGNED has occurred. someone knows what is happening? thanks! Ricardo
-
i have macbook pro 13.3 inch. I am installing window 7 in boot camp manager after copying file of window upto 67% it doesn't response and i had forcely shotdown my macbook. Now my macbook doesn't open and stop in black screen with cursor blinking. No