ABAP Coding Help for Subtotal type output - SAP Query
I've created a SAP Query to display a stock overview by storage type using the table LQUA.
The output that I get is:
Material
Description
Plant
WHN
SLOC
Storage Type
Batch
GR Date
Available stock
2057
STRAWBERRIES
BP01
100
0088
200
0001081766
17.06.2014
225
2057
STRAWBERRIES
BP01
100
0088
200
0001081766
17.06.2014
720
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
I can get a subtotal for each Material, batch and GR date combination by using the ALV grid functionality.
This method adds too much clutter to my query and can't be easily manipulated in Excel afterwards for what I want. I want to condense the results down and just keep a cumulated available stock, e.g:
Material
Description
Plant
WHN
SLOC
Storage Type
Batch
GR Date
Available stock
2057
STRAWBERRIES
BP01
100
0088
200
0001081766
17.06.2014
945
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
4,000
How can this be done?
Hi,
Please try to use STATISTICS in your SAP Query. you can sort and add your value based on condiiton then it will be show you collect value in SQ01.
Please see the below documents for STATISTICS
https://help.sap.com/saphelp_erp2004/helpdata/en/d2/cb4263455611d189710000e8322d00/content.htm
Regards,
Prasenjit Mishra
Similar Messages
-
Standard (ABAP coding) delivery for SES in CRM 2007?
Hello,
I found the Netweaver functionality "Search Engine Service (SES)" on help.sap.com.
This function sounds great. Documents on SDN (like "https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/21404ae5-0601-0010-0395-a6d917099f1a" and "https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a751a1ec-0a01-0010-f0ba-89e4c5cd0261") tell that this functionality is part of Netweaver ABAP and that there're already ready-to-use implementations for business objects in SAP ERP.
However, we're using CRM and want to extend the search functionalities using SES. I was able to create an index for business object BUS1006 (business partner) and insert some data, search for it, and so on. However, it was necessary to do all the data selection manually.
I found enhancement spot COM_PRODUCT_SE which seems to deal with the product search using SES. I tried with business object BUS1006 where enhancement spot HRHAP00_SES seems to be used - however with no (sample) implementation. When creating/updating an index using report COM_SE_DISPATCHER, the methods of the corresponding BADI implementation are called to retrieve object IDs, attribute names, attribute values and so on. As described before, this seems to be not delivered by SAP standard, thus, we have to do the coding in methods IF_HAP_SES_BUSOBJ_AESGET_ATTRIBUTE_NAME_LIST, IF_HAP_SES_BUSOBJ_AESGET_ATTRIBUTE_VALUES, IF_HAP_SES_BUSOBJ_AES~GET_OBJECT_ID_LIST on ourselves?
So my question is: Is the ready-to-use implementation of SES for CRM business objects already contained (and I didn't find it) or will it be part of further shipments?
Many thanks & regards
WolfgangHi Wolfgang,
unfortunately, CRM did not include the SES methods in all their objects.
CRM will focus on enabling their objects on "Embedded Search", which is basically "the next version of SES" that will beavailable for Business Suite 2008 applications. This will then also enable CRM content to be searched through SAP NetWeaver Enterprise Search.
Of course you can - in the meantime - attempt your own implementation of SES for CRM objects. Unfortunately, I am not the right guy to further help with coding details for that.
Best, Karsten -
Input Help for TIME type field
I saw below discussion regarding a dropdown for a "TIME" type field.
Re: Time Search Help
It's a resuable component (that Thomas Jung created) and find it very slick.
I just couldn't make it to work. I'm getting a dump when I pressed the dropdown on the "TIME" field.
I was wondering, has anyone used this in conjunction with select-options (WDR_SELECT_OPTIONS) ?
I'm getting a system-dump, "Component usage VALUE_HELP does not exist". I double checked the name that I used on the "USED COMPONENT" tab and it is VALUE_HELP.
During method ADD_SELECTION_FIELD (for IF_WD_SELECT_OPTIONS) I'm using two parameters I_VALUE_HELP_TYPE = 'APPLDEV' and I_VALUE_HELP_ID = 'VALUE_HELP'.
Maybe I'm not using the right parameters ?
Anyway, I would appreciate if anyone could give me directions to correct the problem.Or maybe there is another and better way of having an input help for a "TIME" type field on select-option.
Thanks.
VicThat is because the TIME is a freely programmed value help and freely programmed value helps are not supported by the Select-Options component. That limited is listed in the online help:
Type of input help specified as type IF_WD_VALUE_HELP_HANDLER.
Note that only ABAP Dictionary-based input help and OVS input help are supported; freely programmable input help is not supported.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/bf07361248003de10000000a11466f/frameset.htm
The reason for this is that the freely programmed value help is accessed via a component usage. The Select-Options however are a separate component. They have no declaration to your components, component usages. Therefore they produce the error that the component usage doesn't exist - which is correct. It doesn't exist in the Select-Options Component. -
My checking account was debited by itunes for a subscription i did not order. How do I go about having it taken off? The entire Apple website and the itunes website is competely non-helpful for resolving problems. They should make their site equally as unfriendly when it comes to enticing you to buy their products.
You could simply type "Contact itunes support" into the google search bar. This would give you the link to contact itunes support.
Or you could just click the word Support at the top of this page, then click the link under Contact Apple Support. -
Search Help for Hierarchy Node in SAP BW 7.3
Hi Experts,
We were previously using SAP BW 7.1 system and we had a table which used to be maintained through SM30 which has a customed search help on one of the fields for a hierarchy object. And it was working perfectly.
However, one of our systems have just been migrated into 7.3 version and the above functionality is no longer working.
This is what is happening now:
- User selects a hierarchy and after selection nothing is being displayed on field on the table.
We have tried to debug this customed search help in both environments to distinguish what is wrong. We have noted that a standard function module (RRSV_IOBJ_VALUE_OUTPUT) is not behaving similarly. In 7.1 system, the C_T_DATA table is being filled whereby in the 7.3 system, it is empty.
Do you think this is the issue?
Please do advise and propose what can be done to make it work. Or any idea on how to create a new search help for a hierarchy node in 7.3?
Thanks in advance.hi,
one more thing i will like to add here is in BW 7.3 you get a new security admin feature that allows you to make mass changes to authorizations instead of one-by-one. This can be done by cut-and-paste in a worklist, hierarchy nodes, and you can also add users to multiple analysis authorizations.
The u2018newu2019 authorizations has both the data value and hierarchy restrictions. You can still build using the u201CRSECADMINu201D transaction
Also make sure that all objects are in the TLIBG library and they will be 'shielded' during the upgrade.
regards
laksh -
Static input help for DATS type
Hello,
I'd like to link static input help for screen field of DATS type. If I click on help linked to this screen field I get CONVT_NO_NUMBER error: 'Unable to interpret "=2" as a number.'
My steps:
- In Screen Painter I selected desired screen field and selected DATS type and "1 Show at selection" in its details.
- I defined global variable with same name as desired screen field
What's the problem?
Best regards,
Josef MotlHi,
do this way.....
first declare the variable in program as
1. data: date type sy-datum.
2. now go to your screen,(click on F6) use get from Program
now choose date form it , and say ok, now save it and activate it.
delete the old one..
now you will be able to get all the things which you want.
automatical validation also possible, and F4 also possible.
Regards
vijay -
How to change the list box to F4 Help for Billing type in VF01
Hi All,
In VF01 for Billing type i am getting List box. Now I have to add one more field to that list box.
like F1 invoice
F2 Invoice returns.
or
Is there any possiblity of making it as F4 Help instead of List Box.
Please throw some lite on this issue.
Regards,
Rohit.Hi ,
The list box is getting the value from the table TVFK .
You can get the table name from the VALUE TABLE of FKART which is the domain
for the field Billing Type .
You need to Update the table TVFk programatically. Like - -
TABLES : tvfk.
tvfk-FKART = 'F1'. " Billing type
tvfk-KOPGR =
tvfk-VTEXT = 'Invoice '. " Billing type description
UPDATE TVKF FROM TVKF. " Update the table
Similarly you have to update the table by the F2 and and description.
tvfk-FKART = 'F2'.
tvfk-KOPGR =
tvfk-VTEXT = 'Invoice returns'.
UPDATE TVKF FROM TVKF.
Regards
Pinaki -
Help needed on creating a SAP query
Hi All,
Can somebody give me the step by step procedures of creating a SAP query and Infoset.
My requirement is to display asset master details with Asset number or Asset class as input.
Any pointers or links to create an infoset and query will br highly helpful.
Thanks,
ArunHere are couple of fields you might be needed :
AGKO Cleared Accounts
ANAR Asset Types
ANAT Asset type text
ANEK Document Header Asset Posting
ANEP Asset Line Items
ANEV Asset downpymt settlement
ANKT Asset classes- Description
ANLA Asset Master Record Segment
ANLB Depreciation terms
ANLC Asset Value Fields
ANLH Main asset number
AT02T Transaction Activity Category- Description
AT02A Transaction Code for Menu TIMN
AT10 Transaction type
AT10T Name of Transaction Type
BKDF Document Header Supplement for Recurring Entry
BKORM Accounting Correspondence Requests
BKPF Accounting Document Header
BLPK Document log header
BLPP Document log item
BLPR Document Log Index and Planned Order (Backflush)
BNKA Bank master record
BP000 Business Partner Master (General Data)
BPBK Doc.Header Controlling Obj.
BPEG Line Item Total Values Controlling Obj.
BPEJ Line Item Annual Values Controlling Obj.
BPEP Line Item Period Values Controlling Obj.
BPGE Totals Record for Total Value Controlling obj.
BPJA Totals Record for Annual Total Controlling Obj.
BSAD Accounting- Secondary Index for Customers (Cleared Items)
BSAK Accounting- Secondary Index for Vendors (Cleared Items)
BSAS Accounting- Secondary Index for G/L Accounts (Cleared Items)
BSEC One-Time Account Data Document Segment
BSEG Accounting Document Segment
BSID Accounting- Secondary Index for Customers
BSIK Accounting- Secondary Index for Vendors
BSIM Secondary Index, Documents for Material
BSIS Accounting- Secondary Index for G/L Accounts
CEPC Profit Center Master Data Table
CEPCT Texts for Profit Center Master Data
COBRA Settlement Rule for Order Settlement
COBRB Distribution Rules Settlement Rule Order Settlement
COKA CO Object- Control Data for Cost Elements
COSP CO Object- Cost Totals for External Postings
COSS CO Object- Cost Totals for Internal Postings
CRCO Assignment of Work Center to Cost Center
CSKA Cost Elements (Data Dependent on Chart of Accounts)
CSKB Cost Elements (Data Dependent on Controlling Area)
CSLA Activity master
FEBEP Electronic Bank Statement Line Items
FPLA Billing Plan
FPLT Billing Plan- Dates
GLPCT EC-PCA- Totals Table
KNA1 General Data in Customer Master
KOMK Pricing Communication Header
MAHNV Management Records for the Dunning Program
REGUT TemSe - Administration Data
SKA1 G/L Account Master (Chart of Accounts)
SKAT G/L Account Master Record (Chart of Accounts- Description)
SKB1 G/L account master (company code)
T003T Document Type Texts
T007S Tax Code Names
T087J Text
TAPRFT Text tab. for investment profile
TKA01 Controlling Areas
TKA09 Basic Settings for Versions
TKVS CO Versions
TZB0T Flow types text table
TZPAT Financial Assets Management product type texts
VBSEGS Document Segment for G/L Accounts Document Parking
VTBFHA Transaction
VTBFHAPO Transaction Flow
VTBFHAZU Transaction Activity
VTBFINKO Transaction Condition
VTIDERI Master Data Listed Options and Futures
VTIFHA Underlying transaction
VTIFHAPO Underlying transaction flows
VTIFHAZU Underlying transaction status table
VTIOF Options Additional Data
VWPANLA Asset master for securities -
Creating search help for a field in AdHoc Query
Hi
We have created an infoset based on LDB PCH.
(The infoset contains object type O only).
For the object-id field the users want search help when choosing this field for selection.
Using "start via selection screen" does not give a good solution.
Can anyone explain how I can create search help for fields in an infoset?
Regards
KirstenHi
We have created an infoset based on LDB PCH.
(The infoset contains object type O only).
For the object-id field the users want search help when choosing this field for selection.
Using "start via selection screen" does not give a good solution.
Can anyone explain how I can create search help for fields in an infoset?
Regards
Kirsten -
How many ways we can create authorization for user groups in sap query reports
Hi Gurus, I am getting a problem when I am assigning users to user group in sap query report .The users other than created in user groups are also able to add &change the users .So please suggest me how to restrict users outside of the user group.
Please send me if u have any suggestions and useful threads.
Thank You,
Suneel Kumar.I don't think it can be done. According to the link below 'Users who have authorization for the authorization object S_QUERY with both the values Change and Maintain, can access all queries of all user groups without being explicitly entered in each user group.'
http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3f89455611d189710000e8322d00/content.htm
Although I think you can add code to your infoset and maybe restrict according to authority group, i.e.:
Use AUTHORITY-CHECK to restrict access to the database based on user.
Press F1 on AUTHORITY-CHECK to find out how to use it in the code -
Please help for using perform in SAP script
As subject.
My sap script code as below:
/: PERFORM GET_CHAMT_DATE IN PROGRAM ZRAP004
/:USING &SPELL-WORD&
/:CHANGING &SPELL-WORD&
/:ENDPERFORM
My program ZRAP004 code as below:
FORM get_chamt_date USING u_iword TYPE spell-word
CHANGING u_oword TYPE spell-word.
CONCATENATE u_iword '元整'(t01) INTO u_oword.
endform.
This form is for check printing.
It's by standard function 'F110' to excute check printing.
But when i finished this transaction. System return error message as below:
<b>This routine contains 2 formal parameters, but the current call
contains 4 actual parameters.</b>
Please help. Thanks a lot!!Hiii
PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
/:USING &EKKO-EBELN&
/:CHANGING &CDECENT&
/:ENDPERFORM
The report :
REPORT zkrpmm_perform_z1medruck .
DATA : BEGIN OF it_input_table OCCURS 10.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_input_table.
déclaration de la table output_table contenant les
variables exportées
DATA : BEGIN OF it_output_table OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_output_table.
DATA : w_ebeln LIKE ekko-ebeln,
w_vbeln LIKE vbak-vbeln,
w_zcdffa LIKE vbak-zcdffa.
FORM CDE_CENT
FORM cde_cent TABLES input output.
it_input_table[] = input[].
it_output_table[] = output[].
READ TABLE it_input_table INDEX 1.
MOVE it_input_table-value TO w_ebeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_ebeln
IMPORTING
output = w_ebeln.
SELECT SINGLE zcdffa FROM ekko
INTO w_zcdffa
WHERE ebeln = w_ebeln.
it_output_table-name = 'CDECENT'.
MOVE w_zcdffa TO it_output_table-value.
MODIFY it_output_table INDEX 1.
output[] = it_output_table[].
ENDFORM. -
WebDynpro for ABAP F4-help for KAGRU like PERFORM f4_groups in KSB1
Hello,
I must realize a search-help in a WebDynpro-Component which looks like the F4-help in the transaction KSB1 for field KAGRU.
In the report RKAEP000 it looks like this.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR koagr.
PERFORM f4_groups USING 'KSTAR'
gs_tka01-ktopl
CHANGING koagr.
But in WebDynpro the Function 'K_GROUP_SELECT' wil generate a short dump.
Has anybody an idea, how to make this in WebDynpro?
GreetingsHow are you trying to use the search help? You can set up value help in the component itself. Go to the component controller context of your web dynpro component. Select the context node attribute for which you would like to have value help. Now go down to the properties. Next to "Input Help Mode" select "Automatic". If your node attributes were brought in from a table (SAP or custom), then if there is an existing search help it will automatically be brought up now next to "Determined Input Help". Save your changes and activate.
If a search help is not brought in when you change the input help mode to automatic, then you can still create your own method to provide the search help. In this case you will need to create your method in the controller of the view where the user will be entering a value for the field. The method type should be "Method". Make sure to call your search help method within the method WDDOINIT of the view. In the search help method you will need to navigate to your mode, select the values for the field, and then set the attribute value set using those values. You will have to look into K_GROUP_SELECT to see where it is getting the values for KAGRU. I don't think you can call K_GROUP_SELECT directly because it creates a pop-up.
A third option is to use an OVS (object value selector) component. Please see this document for help with OVS:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cf40cf90-0201-0010-4a85-e5a207b900d8
I hope this helps.
- April King -
ABAP code Help for Customer Exit variable
Hello All,
Can anyone provide ABAP code for a customer exit variable please?
Requirement:
0CALYEAR(InfoObject) - ZCALCYR (Variable) <b>Calender year with default value actual year</b>.
Proiperties of variable: single value,mandatory,ready for input,can'be changed in query navigation.
i have read some docs on customet exit variables which i got from SDN but i found it's difficult for me to get this as i am not that good in ABAP.
Thanks,
Rakesh.Hi,
Just check the below code. You just need to make slight changes I believe. Hope this helps you.
In CMOD ..
Sample code
INCLUDE LXRSRF01 *
data: l_s_range type rsr_s_rangesid.
case i_vnam.
when 'ZCALCYR'.
if i_step = 1.
l_s_range-low = sy-datum+0(4).
append l_s_range to e_t_range.
Endif.
Endcase. -
ABAP code help for Bex broadcasting by event!
Hello
I'm trying to broadcast a report for a specific time period as per factory calendar. I tried using System Time Point :RSRD_BROADCAST_FOR_TIMEPOINT but its not showing when In the broadcaster when I put restriction of factory calendar so i followed below link: Broadcasting timepoint scheduled after an event and created a PC to start after event and created variant for RSRD_BROADCAST_STARTER setting ID as my Bes broadcast setting technical name.
When I trigger the event its processed and report emailed to me as I expected. Now I want to run this (Trigger) this event every Wed day after fisc quarter close. I wrote the below logic in se38 PROGRAM. But Now I need little help on how to trigger /run only on wed days after fisc quarter close ? Please update the below code or guide me on how to achieve this.
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
EVENTID = ZFISC
endif.
Thanksin your ABAP code try this,
calculate whether current date falls after fiscal year quarter. If so then check whether its a Wednesday and call the event raise FM. You can schedule this program in background daily basis.
Use this FM for day calculation DATE_TO_DAY.
This FM for converting sy-datum to fiscal year/period - FI_PERIOD_DETERMINE,DATE_TO_PERIOD_CONVERT -
A little help for HDMI sound output.
I have an HP Pavilion HPE Series. Pavilion H8-1214 PC
I bought an HDMI cord several months back, to hook up my TV as a second monitor (like for watching movies) and worked fine for some time up until last night when when I tried to update my drivers (like graphics) since it seemed like on certain sites or games it was slow or unresponsive (like facebook games). Now I can't get the audio to work for my TV (the HDMI output) as you can see in the screen shot I took.
http://puu.sh/9SZOT/ab1c31984d.png
I have tried returning to an older restore point - that helped temporarily until I turned my computer on today and realized I still had that problem. I have tried uninstalling that particular driver and reinstalling it - doesn't help, tried disabling and re-enabling - doesn't help.
The only way it seems to work is when I turn the TV on first and then restart my PC, but that is kind of a hassle since when I want to watch a show or movie I have to restart instead of just turning it on and setting TV as "default device" in "Playback Devices" like I did before.
Is there a way to fix this? Please help. Thanks in advance.Hi,
Install the HP posted AMD graphics driver for your PC. It's not uncommon for HP to use a propriety graphics driver.
HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
HP Photosmart Premium C309G, HP Photosmart 6520
HP Touchpad, HP Chromebook 11
Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
Windows 7/8 UEFI/Legacy mode, MBR/GPT
Maybe you are looking for
-
Photoshop CS4: Could not complete your request because of a program error.
Hello, I find myself in an interesting dilemma. I've had CS4 for a bunch of years now and have loved it. Unfortunately, my MacBook Pro's hard drive crashed a month or so back. Luckily, I have been using an external hard drive to back up my computer,
-
I have pre ordred the Childish Gambno album "Because the internet" and when i go to the itunes store on my 4th gen ipod touch and go to the album itll show a purchesed but when i goto my music none of its there. how do i download a pre ordered album
-
Hi In ESS when the User is trying to click on Leave request - Error displayed as below : error displayed as : "A critical error has occured. Processing of the service had to be terminated. Unsaved data has been lost. Please contact your system admini
-
Hi, I wrote the procedure which will check the status and end_date and updates the status to 'Inactive' when end_date is less than sysdate. But I am not able to understand how to use the dbms_job package for this to execute the procedure every night
-
Connecting HP 6980 to Brighthouse Modem/Router
After installing Maverick OS 10.9 (with update to 10.9.1) I have not been able to connect my printer to the network. I cannot get it to connect to get an IP address. I am using a Brighthouse AARIS modem/router. It was working fine before update of Ma