Sum of the items issued and items received
Sir,
if i want to get all the sum of the items issued and items received wrt mblnr and matnr, what shd i do??
thanks
Arun
Hi
Look at this code .It retrieves the sum of LABST field for all line lineitems for a given material No in MARD table.
TYPES : BEGIN OF Type_Mard,
W_MATNR TYPE MARD-MATNR,
W_LABST TYPE MARD-LABST,
END OF Type_MARD.
data : ITAB_MARD TYPE TABLE OF Type_MARD,
wa_MARD TYPE Type_MARD.
SELECT MATNR
SUM( LABST) INTO TABLE ITAB_MARD
FROM MARD WHERE MATNR = p_MATNR " parameters
AND WERKS = P_RESWK .
Hope youll get an idea
Thanks
Viquar Iqbal
Similar Messages
-
Issues with the Delivering Country details in the Delivery hdr and item
Hi Group,
I am facing issues while trying to get the Delivering country details automatically at both the Delivery header and item levels.
All the necessary configuration have been done as such the Delivering country field is fetching incorrect data, even though in the table 'T001W' it was mentioned regarding the Countries(Delivering country and Destination country).
All the configuration seems to be fine.
I tried to debug the standard tcode, but could not succeed till now regarding the resolution part.
Please let me know if you have faced this kind of issue and how to go about resolving this issue.
Regards,
Vishnu.Hi,
The Delivering Plant country is in Germany(DE) and Destination country is in the US(Los Angeles) but still I was getting a value for 'IT'(Italy), which was not at all expected....
So please provide inputs on this to and let me know if you have any other queries also.
Regards,
Vishnu -
How we will display the header data and item data seperately in lists
how we will display the header data and item data seperately in lists
REPORT z_alv_list_block.
TYPE-POOLS: slis. " ALV Global types
SELECTION-SCREEN :
SKIP,
BEGIN OF LINE,
COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(2) TYPE n DEFAULT '02' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
DATA:
1st Table
BEGIN OF gt_kna1 OCCURS 0, " Data displayed
kunnr LIKE kna1-kunnr, " Customer number
ernam LIKE kna1-ernam, " Name of Person who Created
erdat LIKE kna1-erdat, " Creation date
name1 LIKE kna1-name1, " Name 1
END OF gt_kna1,
2nd Table
BEGIN OF gt_mara OCCURS 0,
ernam LIKE mara-ernam, " Name of Person who Created
matnr LIKE mara-matnr, " Material number
ersda LIKE mara-e rsda, " Creation date
brgew LIKE mara-brgew, " Gross weight
END OF gt_mara,
3rd Table
BEGIN OF gt_vbak OCCURS 0,
vkorg LIKE vbak-vkorg, " Sales organization
kunnr LIKE vbak-kunnr, " Sold-to party
vbeln LIKE vbak-vbeln, " Sales document
netwr LIKE vbak-netwr, " Net Value of the Sales Order
waerk LIKE vbak-waerk, " SD document currency
END OF gt_vbak.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
Read data
SELECT * FROM kna1
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_kna1.
SELECT * FROM mara
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_mara.
SELECT * FROM vbak
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_vbak.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'.
PERFORM list_append TABLES gt_kna1
USING '1'
'GT_KNA1'.
PERFORM list_append TABLES gt_mara
USING '2'
'GT_MARA'.
PERFORM list_append TABLES gt_vbak
USING '3'
'GT_VBAK'.
PERFORM f_list_display.
FORM USER_COMMAND *
FORM user_command USING i_ucomm LIKE sy-ucomm
is_selfield TYPE slis_selfield. "#EC CALLED
CASE i_ucomm.
WHEN '&IC1'. " Pick
CASE is_selfield-tabname.
WHEN 'GT_MARA'.
WHEN 'GT_KNA1'.
WHEN 'GT_VBAK'.
READ TABLE gt_vbak INDEX is_selfield-tabindex.
IF sy-subrc EQ 0.
Sales order number
SET PARAMETER ID 'AUN' FIELD gt_vbak-vbeln.
Display Sales Order
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDCASE.
ENDFORM. " USER_COMMAND
----< /div>
Form list_append
FORM list_append TABLES ut_table
USING u_no TYPE char1
u_tabname TYPE slis_tabname.
Macro definition
DEFINE m_fieldcat.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = &2.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
DEFINE m_sort.
ls_sort-fieldname = &1.
ls_sort-up = 'X'.
append ls_sort to lt_sort.
END-OF-DEFINITION.
DATA :
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
ls_sort TYPE slis_sortinfo_alv,
lt_sort TYPE slis_t_sortinfo_alv. " Sort table
DATA:
lt_events TYPE slis_t_event,
ls_event TYPE slis_alv_event,
ls_layout TYPE slis_layout_alv.
ls_layout-group_change_edit = 'X'.
ls_layout-colwidth_optimize = 'X'.
ls_layout-zebra = 'X'.
ls_layout-detail_popup = 'X'.
ls_layout-get_selinfos = 'X'.
ls_layout-max_linesize = '200'.
CASE u_no.
WHEN '1'.
Build field catalog and sort table
m_fieldcat 'KUNNR' 'KNA1'.
m_fieldcat 'ERNAM' 'KNA1'.
m_fieldcat 'ERDAT' 'KNA1'.
m_fieldcat 'NAME1' 'KNA1'.
m_sort 'KUNNR'.
WHEN '2'.
m_fieldcat 'MATNR' 'MARA'.
m_fieldcat 'ERNAM' 'MARA'.
m_fieldcat 'ERSDA' 'MARA'.
m_fieldcat 'BRGEW' 'MARA'.
m_sort 'MATNR'.
WHEN '3'.
m_fieldcat 'VBELN' 'VBAK'.
m_fieldcat 'VKORG' 'VBAK'.
m_fieldcat 'KUNNR' 'VBAK'.
m_fieldcat 'NETWR' 'VBAK'.
m_fieldcat 'WAERK' 'VBAK'.
m_sort 'VBELN'.
ENDCASE.
IF u_no CA '13'.
MOVE 'TOP_OF_PAGE' TO ls_event-name.
CONCATENATE 'TOP_OF_PAGE' u_no INTO ls_event-form.
APPEND ls_event TO lt_events.
ELSE.
MOVE 'TOP_OF_LIST' TO ls_event-name.
CONCATENATE 'TOP_OF_LIST' u_no INTO ls_event-form.
APPEND ls_event TO lt_events.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
it_fieldcat = lt_fieldcat
is_layout = ls_layout
i_tabname = u_tabname
it_events = lt_events
it_sort = lt_sort
i_text =
TABLES
t_outtab = ut_table
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 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.
ENDFORM. " LIST_APPEND
Form f_list_display
FORM f_list_display.
DATA ls_print TYPE slis_print_alv.
ls_print-no_print_selinfos = 'X'. " Display no selection infos
ls_print-no_print_listinfos = 'X'. " Display no listinfos
ls_print-reserve_lines = 2. " Lines reserved for end of page
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
i_interface_check = ' '
is_print = ls_print
EXCEPTIONS
program_error = 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.
ENDFORM. " F_LIST_DISPLAY
FORM top_of_page1 *
FORM top_of_page1. "#EC CALLED
PERFORM top_of_page.
ENDFORM.
FORM top_of_page3 *
FORM top_of_page3. "#EC CALLED
PERFORM top_of_page.
ENDFORM.
FORM top_of_page *
FORM top_of_page.
ULINE.
WRITE : sy-uname, sy-title(56) CENTERED, sy-datum.
ULINE.
ENDFORM.
FORM top_of_list2 *
FORM top_of_list2. "#EC CALLED
WRITE 'TOP OF LIST2'.
ENDFORM.
END OF PROGRAM Z_ALV_LIST_BLOCK *********************** -
Update the Purchase requesition and item fields in ME22N
Dear Friends,
I need a sample BDC program to update the Purchase requesition and item fields in ME22N Tcode. if any one is having it pls send me.
Thanks,
SridharHi,
it is not suggested to do a BDC on enjoy transactions...Hence better use a BAPI:
BAPI_PO_CHANGE
BAPI_PO_CHANGE1
Regarrds
Shiva -
Item text and item note are not transfering from SRM to ECC on to PR
Hello Expers!!!
Due to some requirement we added some logic in BBP_CREATE_BE_RQ_NEW to print the used ID of the shopping cart creator on PR under item text requisitioner tab. but after moving these changes to production the item text(Vendor text) and item note(internal note) which are maintained in the shopping cart are not printing on the Purchase requisition under item text and item note tabs. these two texts were printing correctly before moving our changes.
please suggest me how this item note and item text will print on PR. Is it a standard functionlity in SRM 5.0?
is this because of move over changes?
suggest me to resolve the issue....
thanks in advance...
Regards,
CD ReddyDear Poster,
As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
Best Regards,
SDN SRM Moderation Team -
Workflow with item type and item key is in progress. Abort existing workfl
Dear all,
I'm using the below code from the submit button event to launch the workflow. The workflow works fine when I submit for the first time, when i try to submit for the second time from the same session it throws me the error as Workflow with item type and item key is in progress. Abort existing workflow.
Where I am struck,Kindly send me any solution.
I am using below code in oaf
public void workflow(OAPageContext pageContext,
String headerId,
String empName,
String userName
String wfItemType = "XXSample";
String wfProcess = "XXSample";
String wfItemKey = headerId;
OANavigation wfClass = new OANavigation();
// Create Workflow Process
wfClass.createProcess(pageContext, wfItemType, wfProcess, wfItemKey);
System.out.println("Workflow created");
wfClass.setItemAttrText(pageContext,
wfItemType,
wfItemKey,
"XXHDRID",
headerId);
wfClass.setItemAttrText(pageContext,
wfItemType,
wfItemKey,
"XXEMPNAME",
employeeName);
wfClass.setItemOwner(pageContext, wfItemType, wfItemKey,username);
wfClass.startProcess(pageContext, wfItemType, wfProcess, wfItemKey);
System.out.println("Workflow started");
Thanks,
Kumar.Item type and item key forms unique record for the workflow session, you cannot have 2 instances of the workflow running for the same header id, in your case. Check if the process exists for the header id. If so, display a warning message without launching another workflow session, else start the workflow process.
Thanks
Shree -
Can you explain about Higher-level item category and item usage?
Hi all
Can you explain about Higher-level item category and item usage?
thanks allHigher level item category and Item usage are used in the item category determination.
Let me take an example of Item Category TANN (Free of charge Item)
Item category Determination: Sales Document type + Item Category Group + Usage + Higher Level Item Category
TA + NORM + FREE + TAN = TANN
Higher Level Item category: The category on which this item category is dependent. meaning for TAN , TANN is a free item. Therefor TAN is the higher level item category.
Item Category Usage: It controls system response during document processing. The line item has an specific usage according to that usage it has to respond. Free for free items, text for text items etc.
Regards
AK
Reward points if helpful -
Good Issue and Good Receive in Inventory Management
Hi everybody,
I have a problem to set initial stock in inventory management, because the result between BW and R/3 are not the same.
I use ZLIS_40_S278 and use some routine to calculate total good issue and good receive based on movement type.
Before that our users already define all movement type belongs to good issue and good receive.
Basically how we can get good issue and good receive value?
Regards,
Steph.Hi Steph
Use the following key figures
0ISSBLOSTCK - Issue quantity: blocked stock
0ISSCNSSTCK - Quantity Issued from Consignment Stock
0ISSQMSTCK - Issue quantity: stock in quality inspection
0ISSTRANSST - Issue Quantity: Stock in Transit
0ISSTOTSTCK - Issue Quantity Total Stock
0ISSVALSTCK - Quantity Issued from Valuated Stock
0RECBLOSTCK - Receipt Quantity: Blocked Stock
0RECCNSSTCK - Quantity Received into Consignment Stock
0RECQMSTCK - Receipt Quantity: Stock in Quality Inspection
0RECTRANSST - Receipt Quantity: Stock in Transit
0RECTOTSTCK - Receipt Quantity Total Stock
0RECVALSTCK - Quantity Received into Valuated Stock
Thanks. -
My daughter has downloaded free games from the App Store and I have been charged in excess of £200 and I don't know why has anyone had the same issue and if so how did you get your money back
Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact
To help avoid future transgressions set the Restrictions for In-App Purchases...
Settings > General > Restrictions
Understanding Restrictions > http://support.apple.com/kb/HT4213 -
Have ordered Photoshop Elements 12 and Premiere Elements 12 (for MAC, EN version). Order went through but finally order was cancelled as Adobe Store was unable to approve. Subsequently order was cancelled. did anybody experience the same issue and how to proceed.
Hi there
Please check with your credit card issuer to see why payment is not being approved. When this is resolved you should be able to place a new order.
Thanks
Bev -
I have 10$ but I don't have the security Q and my receive email is inactivate...
By default the page will be se to the US, so it will be expecting a US phone number, I forgot that it's different form for each country.
As you are in Israel and there isn't a specific contact page for Israel, try this form to contact Support : https://ssl.apple.com/emea/support/itunes/contact.html
(As these are user-to-user forums I've asked the hosts to remove your screenshot as it contains your phone number.) -
I'm having trouble with my iPhone 5 iMessage service. The device does not recognize the users who have iMessage when I try to contact them using this feature. Who have the same issue and what did you do in order to solve it?
Read here:
http://support.apple.com/kb/ts2755 -
i have the iphone 4s and i received a video but its in slow motion now is there any way to convert the slow motion to regular speed with my 4s
Only your service provider can unlock the phone. Check with the provided.
-
I recently purchased a Seagate Backup Plus Slim portable hardrive. Despite Seagate claiming the product is compatible with OS X 10.5 I cannot get the installer to launch. Has anyone encountered the same issue and found a viable solution?
A Gigaware 9pin to 4pin fw cable solved my issue. The Rocketfish fw cable was crap. And that thing cost me $24.99 from Best Buy. Getting my money back for sure.
-
Event firing at item added and item updated in event receiver?
Hi All,
I have created event receiver on item added & item updated on document library.
1) On Item Added i am updating document library Title column with document Name and i have metadata for the file.
2) On Item Updated i am move that file with metadata to another document library.
Now the issue is the event is triggering is twice when an item is added it automatically calls the item updated event
Need to help please...
Thanks
Balaji MoreHi Thanks for reply.
I have also write Workflow on Source doc library for document approval.
In Source doc library i have choice column fields[Status]. Pending,Approved Default is Pending
when approvers approve the task then i want to update Status: pending to Approved in source doc library using workflow it worked but that time i also want to update destination doc library Status column using Item updated Event receiver but not successed.
Following is code on Item Added.
try
using (SPWeb oWeb = properties.OpenWeb())
oWeb.AllowUnsafeUpdates = true;
string UpdateStatus= string.Empty;
UpdateStatus= properties.ListItem["Status"].ToString();
SPFile File = properties.ListItem.File;
SPDocumentLibrary destLib = (SPDocumentLibrary)properties.ListItem.Web.Lists["documents"];
SPFolder mylibrary = oWeb.GetFolder("Temp");
SPFile spfile = mylibrary.Files.Add(File, streamWriter, true);
SPFile newfile = spfile;
SPListItem item = file.Item;
item["Status"] = UpdateStatus;
item.Update();
oWeb.AllowUnsafeUpdates = true;
Catch()
Item Updated when workflow is approved status is changed Pending to Approved
then i have write a following code but status is not updated when workflow is completed
try
using (SPWeb oWeb = properties.OpenWeb())
oWeb.AllowUnsafeUpdates = true;
string UpdateStatus= string.Empty;
SPFile File = properties.ListItem.File;
if (properties.ListItem["Status"] != null)
UpdateStatus = properties.ListItem["Status"].ToString();
SPDocumentLibrary destLib = (SPDocumentLibrary)properties.ListItem.Web.Lists["documents"];
SPFolder mylibrary = oWeb.GetFolder("Temp");
SPFile spfile = mylibrary.Files.Add(File, streamWriter, true);
SPFile newfile = spfile;
SPListItem item = file.Item;
item["Status"] = UpdateStatus;
item.Update();
oWeb.AllowUnsafeUpdates = true;
Catch()
Thanks
Balaji More
Maybe you are looking for
-
Macbook pro 13-inch mid 2012 manual
I can not locate the manual for my MacBook Pro 13-inch mid 2012 - Which mnual shuld I use if there is none.
-
Need to integrate SAP MDM 5.5 with BW
Hi, I am working on SAP MDM for last 4 months. I don't have any knowledge of BW. I need to integrate SAP MDM 5.5 with BW. I have checked with SAP R/3 SAINT transaction that MDM_TECH 555_700 is installed. Now, I have created logical connection with MD
-
How to create the good received list before actual goods receipt?
Hi, Current process at client's end. 1)Shipment arrives from vendor 2)Warehouse prints the reception note (with the system generated no.), based on the purchase order (usually referenced on package or vendor paperwork) 3)Warehouse confirms the correc
-
HOW DO I GET MY ICONS TO RETURN TO REGULAR SIZE?
MY ICONS ARE BLOWN UP WHEN I OPEN MY SCREN UP. HOW DO I RETURN TO NORMAL SIZE TO SEE THE FULL SCREEN ?
-
Hello Everyone, I've noticed that in my UDO matrix only visible & active columns are being saved in the DB, although i do manage and set values in some fields which are not represented on matrix, through the DBDataSource. Is there any way to make it