Alv report on material document
hi to all thankds in advancee
can u pls give coding for the report following
created alv report to display materila document list per given receiving plant , receving storage location , and supplying plant , receving supplying storage location movemnt type and document date .
thanks
Hi,
Use another internal table to display output.
make changes in new table from previous table.
loop at itab.
at new <matnr>.
jtab = itab. " Copy all the fields from itab to jtab and append
append jtab.
continue.
endat.
ord_quan = ord_quan + count1.
ship_quan = ship_quan + count2.
at end of <matnr>.
itab-ord-quan = ord-quan.
itab-ship_quan = ship_quan.
itab-balance = itab-ord_quan - itab-ship_quan.
jtab = itab.
append jtab.
endat.
clear itab.
endloop.
Use this JTAB to print the output.
Regards,
Bhanu
Similar Messages
-
Report on Material document by Material Group
Hi
Apart from MB51 is there any report for Material document list by one of the selection criteria as Material Group
Its urgent Please
Regards
Amuthan MHi all
Thanks so much for your immediate response
Friend
MB59 is same as MB51
Anyway I will try ,if i get it , will post in this
Regards
Amuthan M -
Standard report for material document with excise
Dear Gurus,
Is there any standard report for which i can trace for all the incoming material grn whether excise is captured or not.
i.e) a report with excise no, quantity and material document
thanks in advance
VasanthHi,
J1i7 is the standard report which shows wether the part1 or part2 is posted or no posting is done, you can select the layout as per your choice by change layout.
Thanks,
Vinay -
Report for material documents with storage location
Hi gurus,
I would like to know if there is a report to display material documents but in the same screen display storage location from and storage location dest.
Thanks for your help.
Regards.Hi,
You can use MB51 or MB59 with customised layout selection for your requirement.
With regards,
Ajay. -
Subtotal function in ALV report
Hi, experts,
I got a problem when creating an ALV report about billing document.
This ALV report include following info:
Billing date
Billing doc no.
Customer no.
Customer name
Material no.
Material name
Condition name
Qty
Unit price
Amount
Tax amount
Invoice total
The logic of subtotal for this report is:
In same billing document no.
1. If condition name=A, then subtotal Qty, Amount, Invoice total by material no.
2. If condition name ≠A, then subtotal Qty, Amount , Invoice total by condition name
Is it possible? How can I achieve it?Hi,
Please find details on how to modify ALV report below:
/people/ravikumar.allampallam/blog/2005/12/05/need-a-way-to-change-appearance-of-a-standard-existing-alv-report
<b>Reward if helpful.</b> -
How to display images in a simple or alv report
Dear gurus ,
i want to create a classical or ALV Report showing material codes(mara-matnr) and their respective images .
how can i achieve it means where i will store the images and how i will fetch it in the report .Plz send any sample code for this . Full points will be awarded .
Thanks ,
Amit Ranjan .hi
please use the following procedures
Upload Logo for REUSE_ALV_COMMENTARY_WRITE
For those who wish to upload and use a picture in your ALV abap reports.
Steps for uploading Logo :-:
1. Goto the transaction OAER
2. Enter the class name as 'PICTURES'
3. Enter the class type as 'OT'
4. Enter the object key as the name of the logo you wish to give
5. Execute
6. Then in the new screen select Standard doc. types in bottom window
Click on the Screen icon
Now, it will ask for the file path where you have to upload the logo
7. Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
or
Import Logo and Background Picture for Reporting
In this step, you can import a customer-specific logo and a background picture into the R/3 System. These will be displayed in the header area of reports in HR Funds and Position Management.
From the SPRO:
HR Funds and Position Management --> Dialog Control --> Customize Reporting Interface --> Import Logo and Background Picture for Reporting.
Activities
1. Enter the Name of your logo/background picture as an object key in the initial screen.
2. Make sure that the class name is PICTURES, and the class type is OT.
3. Choose Execute.
4. Double-click the document type Picture on the Create tab page. A dialog box will appear in which you can enter the path in which the logo/background picture can be found.
5. Enter the path and choose Open. The logo will be uploaded into the current R/3 System. If the logo/background picture is to be transported into other systems as well, choose Transport.
6. Return to the initial screen and repeat the procedure after having entered the Name of your background picture as an object key.
Please note that the logo/background picture can only be displayed in ALV-based reports with an HTML header. Manually programmed reports such as business distribution plans are not based on the ALV.
If you have selected several initial objects, ALV-based reports in HR Funds and Position Management will automatically use a hiearchical-sequential display. A logo is not displayed here either. Note also that the logo cannot be printed (see print preview in program).
Make sure that the logo does not exceed a height of 100 pixels because it would mean that the header of the report will be scrollable.
reward points if useful,
Thanks,
Usha -
Display two heading in single column using ALV report
Hi Experts,
I got a requirement for displaying 2 rows heading in a single column report. Is it possible that I can perform this task using ALV. How to get this 2 rows in ALV.
This is a criteria that need to be output in ALV REPORT.
MATERIAL CODE--MATERIAL NUMBERSTORAGE LOC----SLOC1 SLOC2
--DATE--DATE1 DATE2
123445--TEST MATERIAL22--
3
As mentioned above storage loc and date will be changing with respect to data dynamically and under this double heading qty will be displayed.
Just want to know how to get double heading. It is clear that how to display dynamically but unaware of double heading using fieldcatalog.
Regards,
YahyaHi Yahya,
Please pass row position in fieldcatalogue for the respective columns.
E.g MOVE '2' to w_fieldcat-row_pos. " This will display the field in 2nd row.
Thanks,
Rupali -
How to get receiving and sending storage location in material document?
Hi, guys,
I am now writing a report about material document. I need to get receiving storage location and sending storage location from material document in MSEG table , Is there any function module for this ?
Thanks.
JustinI don't know, but there is a SELECT statement that lets you read any desired column from the database.
Thomas -
hi
i have a requirment in my alv report ,i need to show values of material description i.e only gsm values in different colour i. 296 GSM and corresponding below values 285 GSM,.below show is sample output onf my alv report.
materialno material deccription
GB CPB HWC 296 GSM 055.000 X 092.000
GB CPB HWC 296 GSM 082.000 X 117.000
GB CPB HWC 285 GSM 045.200 X 070.500
GB CPB HWC 285 GSM 045.200 X 070.500
GBCPB HWC 285 GSM 045.200 X 070.500
GB CPB HWC 285 GSM 045.200 X 070.500Hi
i am sending you a code where i had colored one field
you can refer this program and you can understand very well where exactly what we have to do for colors
reward if usefull
REPORT zalv_with_colored_fields .
TYPE-POOLS : slis.
DATA : BEGIN OF it_final1 OCCURS 0,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
cityfrom TYPE spfli-cityfrom,
cityto TYPE spfli-cityto,
cellcolors TYPE lvc_t_scol,
END OF it_final1 .
DATA : BEGIN OF it_final OCCURS 0,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
cityfrom TYPE spfli-cityfrom,
cityto TYPE spfli-cityto,
END OF it_final .
DATA : git_cellcolors TYPE TABLE OF lvc_s_scol,
gwa_color TYPE lvc_s_scol,
layout TYPE slis_layout_alv.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF it_fieldcat.
START-OF-SELECTION .
SELECT carrid connid cityfrom cityto FROM spfli INTO TABLE it_final .
wa_fieldcat-col_pos = '0'.
wa_fieldcat-tabname = 'IT_FINAL' .
wa_fieldcat-fieldname = 'CARRID' .
wa_fieldcat-seltext_m = 'Carrier ID'(001) .
APPEND wa_fieldcat TO it_fieldcat .
wa_fieldcat-col_pos = '1'.
wa_fieldcat-tabname = 'IT_FINAL' .
wa_fieldcat-fieldname = 'CONNID' .
wa_fieldcat-seltext_m = 'Flight Connection Number'(002) .
APPEND wa_fieldcat TO it_fieldcat .
wa_fieldcat-col_pos = '2'.
wa_fieldcat-tabname = 'IT_FINAL' .
wa_fieldcat-fieldname = 'CITYFROM' .
wa_fieldcat-seltext_m = 'City from'(003) .
APPEND wa_fieldcat TO it_fieldcat .
wa_fieldcat-col_pos = '3'.
wa_fieldcat-tabname = 'IT_FINAL' .
wa_fieldcat-fieldname = 'CITYTO' .
wa_fieldcat-seltext_m = 'City to'(004) .
APPEND wa_fieldcat TO it_fieldcat .
LOOP AT it_final .
it_final1-carrid = it_final-carrid.
it_final1-connid = it_final-connid.
it_final1-cityfrom = it_final-cityfrom.
it_final1-cityto = it_final-cityto.
CLEAR gwa_color.
<b> IF it_final-carrid = 'AA' .
gwa_color-fname = 'CARRID'.
gwa_color-nokeycol = '1'.
gwa_color-color-col = '6'.
gwa_color-color-int = '1'.</b>
APPEND gwa_color TO git_cellcolors.
it_final1-cellcolors = git_cellcolors.
ENDIF.
IF it_final-carrid = 'AZ' .
gwa_color-fname = 'CARRID'.
gwa_color-nokeycol = '1'.
gwa_color-color-col = '5'.
gwa_color-color-int = '1'.
APPEND gwa_color TO git_cellcolors.
it_final1-cellcolors = git_cellcolors.
ENDIF.</b>
REFRESH git_cellcolors.
APPEND it_final1.
CLEAR : it_final , it_final1 .
ENDLOOP.
layout-coltab_fieldname = 'CELLCOLORS'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = layout
it_fieldcat = it_fieldcat
TABLES
t_outtab = it_final1. -
Calling standard printer driver program RVADOR01 from ALV report
I have ALV report (Sales order documents) and one of columns in report is icon type with print preview link (hotspot). When user press icon, I would like to call standard print program RVADOR01 (actually we have custom Z_RVADOR01 and custom smartform which are working fine when using Document -> Output in VA03) to display print preview. I don't know how to call (trigger) print driver routine and pass needed parameters to it (ex. SO number).
MarkoActually I did that. But then you are at least three clicks away from print preview screen. For testing purpose I've created custom smartform and run it from my report. It is working like I want. Now, instead of my procedure I want to run standard printer driver program with needed parameters. I believe that all it needs is document number (vbeln) and all the rest is already there, program, smatform... I just don't know how to use it (ex. pass parameters).
I know I maybe complicating too much but I am ABAP beginner and want to learn as much as possible. Thank you anyway! -
Report for Material and accounting document
Hi all,
Is there any report to show the fields as listed below:
Mvt type Material Doc Accounting doc Posting date Quantity Ammount
thanks & regards
Chaitanyahi,
You can check with the many reports like MB5B, MB51 etc...as suggested above...
But along with this you can check the table also like MSEG for your requirement... and MKPF for the material document...
Pls check ...
Hope it helps...
Regards
Priyanka.P -
WBS element in Material Document List Report
Hi Guru,
I have a problem about WBS element which is not show up any data in Material Document List (MB51) movement type 281 and 281 Q event I add WBS in the document. Anyone know how can i config or do anything to let the system show up, please let me know.
Thanks in advance.Hi,
Go to SPRO > MM > Inventory Management and Physical Inventory > Reporting > Define Field Selection for Material Document List > Here for Program Name "RM07DOCS", Table "MSEG" add field "MAT_PSPNR" (Valuated Sales Order Stock WBS Element) and activate "Output" indicator.
And Then check in MB51 -
Display Material |Attachment File in ALV report
Dear All,
I have to make ALV report for mutliple material attachment file.I want to display material wise attachment where user can see in report. We can see attachment list in Service For Object button in MM03 tcode for single material. And i also i do not want attachement list on tool bar where like MM03 is dispalying.
I need ALV report for materialcodewise image/attachment file like,
MaterialCode File
A101 any filename
B101 any filename
So user can click on file base on material, then file will open and he can see image/attachment.
Please guide me for above mentioned query.
Regards,
Shivam.Dear Shivam,
You can have multiple attachments for a sinlge material. You need to consider that in your report.
for getting the list of attachments using the static method CL_BINARY_RELATION=>READ_LINKS.
DATA: lw_BOR TYPE sibflporb.
DATA: lt_rel TYPE OBL_T_RELT,
lw_rel type OBL_S_RELT.
DATA: lt_links TYPE obl_t_link,
lw_links type OBL_S_LINK.
DATA: lo_root TYPE REF TO cx_root.
lw_bor-instid = <Materail no.> "<------- Materail No.
lw_bor-typeid = 'BUS1001006'.
lw_bor-catid = 'BO'.
lw_rel-sign = 'I'.
lw_rel-option = 'EQ'.
lw_rel-low = 'ATTA'. "<----------Attachments
APPEND lw_relt TO lt_rel.
TRY.
CALL METHOD cl_binary_relation=>read_links
EXPORTING
is_object = lw_bor
it_relation_options = lt_rel
IMPORTING
et_links = lt_links.
CATCH cx_root INTO lo_root.
ENDTRY.
Once you get the list of attachment populate your output table using the same.
you can use FM SO_OBJECT_READ to get details of attachment.
Make the column with attachment as hotspot, so that ALV take action in sinlge user click.
In the user-command of ALV write the code to open the attachment.
you can use the FM SO_DOCUMENTS_MANAGER
Hope this helps you.
Regards,
Sachinkumar Mehta -
Nee help on ALV report for Total of BSEG-BUZEI & F1 document in FB03
Hi friends,
I need to diplay line items total & when double clicked on BELNR field it should open the F1 document in FB03.
Could anyone plz guide me on this.
Waiting for response.
below is my code,
Kindly needed help.
REPORT YALV_1.
TABLES : BKPF,BSEG.
Data for ALV display
TYPE-POOLS: SLIS.
data : int_fcat type SLIS_T_FIELDCAT_ALV,
fieldcatalog type slis_t_fieldcat_alv with header line.
DATA: wa_sortinfo TYPE slis_sortinfo_alv,
i_sortcat TYPE slis_t_sortinfo_alv.
TYPES : BEGIN OF T_BKPF,
BUKRS TYPE BKPF-BUKRS,
BELNR TYPE BKPF-BELNR,
GJAHR TYPE BKPF-GJAHR,
BLART TYPE BKPF-BLART,
BLDAT TYPE BKPF-BLDAT,
BUDAT TYPE BKPF-BUDAT,
END OF T_BKPF.
types: begin of t_bseg,
BUZEI TYPE BSEG-BUZEI,
end of t_bseg.
DATA : it_bkpf TYPE STANDARD TABLE OF t_bkpf with header line,
wa_bkpf TYPE t_bkpf,
it_bseg type standard table of t_bseg.
wa_bseg type t_bseg.
field to store report name
DATA : i_repid like sy-repid.
select bukrs belnr gjahr blart bldat budat from bkpf into table
it_bkpf where blart = 'AA'.
field to check table length
*data i_lines like sy-tabix.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
PERFORM sortcat_init CHANGING i_sortcat.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but
*can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such
*as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'BUKRS'.
fieldcatalog-seltext_m = 'Company Code'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 4.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'BELNR'.
fieldcatalog-seltext_m = 'Doc No'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'GJAHR'.
fieldcatalog-seltext_m = 'Fiscal Year'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'BLART'.
fieldcatalog-seltext_m = 'DOC Type'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'BLDAT'.
fieldcatalog-seltext_m = 'Doc Date'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'BUDAT'.
fieldcatalog-seltext_m = 'Popsting Date'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'BUZEI'.
fieldcatalog-seltext_m = 'Line Items'.
fieldcatalog-col_pos = 6.
fieldcatalog-do_sum = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
FORM sortcat_init CHANGING i_sortcat TYPE slis_t_sortinfo_alv.
CLEAR wa_sortinfo.
wa_sortinfo-fieldname = 'BUKRS'.
wa_sortinfo-tabname = 'T_BKPF'.
wa_sortinfo-spos = 1. " First sort by this field.
wa_sortinfo-up = 'X'. " Ascending
wa_sortinfo-subtot = 'X'. " Subtotal at Name1
APPEND wa_sortinfo TO i_sortcat.
CLEAR wa_sortinfo.
wa_sortinfo-fieldname = 'BELNR'.
wa_sortinfo-tabname = 'T_BKPF'.
wa_sortinfo-spos = 2. " Sec sort by this field.
wa_sortinfo-up = 'X'. " Ascending
wa_sortinfo-subtot = 'X'. " Subtotal at Name1
APPEND wa_sortinfo TO i_sortcat.
ENDFORM. " sortcat_init
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
i_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = i_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_sort = i_sortcat
it_special_groups = gd_tabgroup
IT_EVENTS = GT_XEVENTS
i_save = 'X'
is_variant = z_template
tables
t_outtab = IT_BKPF
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. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
form data_retrieval.
IF it_bkpf[] IS NOT INITIAL.
select buzei from bseg into
table it_bseg for all entries in it_bkpf
where bukrs = it_bkpf-bukrs
and belnr = it_bkpf-belnr
and gjahr = it_bkpf-gjahr.
endif.
endform. " DATA_RETRIEVAL.Hello
1.
form display_alv_report.
i_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = i_repid
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = IT_BKPF
exceptions
program_error = 1
others = 2.
2.
* FORM USER_COMMAND
FORM user_command USING u_com LIKE sy-ucomm sel_lin TYPE slis_selfield.
CASE u_com.
WHEN '&IC1'.
CASE sel_lin.
WHEN 'BELNR'.
read TABLE IT_BKPF INDEX sel_lin-tabindex.
SET PARAMETER ID 'BLN' FIELD IT_BKPF-BELNR.
SET PARAMETER ID 'BUK' FIELD IT_BKPF-BUKRS.
SET PARAMETER ID 'GJR' FIELD IT_BKPF-GJAHR.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDCASE.
CLEAR u_com.
ENDCASE.
ENDFORM. "USER_COMMAND -
Report- material document for allocation- adding transfers
Hi!
Can anyone help me in cretainmg this small report to use for adding transfers to allocation table please?
Its a small report but somehow I am not reaching the target
--new block
Selection Screen:
Material Document of Original Transfer Posting (101/311): __________ (ZALLOC- ZMBLNR)
Receiving Plant/S.Loc. Item of Original Transfer Posting (101/311): ____ (ZALLOC- ZZEILE)
Material Document of Pro-rationed Transfer Posting (901/911): __________ (ZALLOC-ZMBLNR_PRO)
Receiving Plant/S.Loc. Item of Pro-rationed Transfer Posting (901/911): ____ (ZALLOC- ZZEILE_PRO)
--end block
--new block
Issuing Plant: ____ (ZALLOC-ZWERKS_ISS)
Issuing Storage Location: ____ (ZALLOC-ZLGORT_ISS)
Receiving Plant: ____ (ZALLOC-ZWERKS)
Receiving Storage Location: ____ (ZALLOC-ZLGORT)
Batch: TRANSFERS (ZALLOC-ZCHARG non-changeable default TRANSFERS)
--end block
Program Flow:-
- Find the material document lines of the pro-rationed transfer posting.
- Check to see if the pro-rationed document is a 901 or a 911 material document. Display hard error Pro-rationed document item is not a 901 or 911 movement type
- Check to make sure that the MSEG-WERKS and LGORT match the receiving plant and storage location ZWERKS and ZLGORT. Display Hard Error Provided pro-rationed item plant and storage location does not match the provided receiving plant and storage location.
- Check the material document ZMBLNR_PRO and ZZEILE_PRO for MSEG-SHKZG = S. Display hard error Item Line is not an Inbound Item into Receiving Facility. Check for correct item line in pro-rationed material document (901/911)
- Check to see if this key has already been entered into the ZALLOC table.
- If it is grab the volume from the item line, populate all fields
- Use the Posting Date as the date.
- Insert it into the table.
- Provide success/error report to show the record entered.
Basically this updates the allocation table as the recoerds are entered i this report. Kindly help please.
Thanks
Aarav>
suresh kumar wrote:
> Dear All
>
>
> Thanks For All Replys
>
>
> BKPF-AWKEY this field stored material document and year but this field is not a key field so we are facing performence issue what can i do?
>
>
>
> Thanks and Regards
> Suresh
Hello Suresh,
What are the input parameters to the report? May be you can add some fields to the selection-screen like Company Code, Fiscal Year etc.
Hope this helps.
BR,
Suhas
Maybe you are looking for
-
File-to-Idoc error (using business sender service)
Hello, My scenario is Flat file to IDoc. I am using a business service as my sender system. I did put in a logical system name in the business service and I have added the logical system in SALE. The error I am getting is <SAP:Code area="IDOC_ADAPT
-
How to use stored package in form.
hi i created the following package but now i want to use the following code in form how could i use?. create or replace package body mahi is -- Write a MIME header procedure write_mime_header ( p_conn in out nocopy utl_smtp.connection , p_name in var
-
I feel like I've been getting some inconsistent info on which to shoot for my specific camera from searches on the web, so I thought someone here would have some better answers. Now some of you will jump on that first sentence and say "Well it depend
-
How about fixing the bug report submission page ?
I've been trying for I think the 11 time to submit a bugreport to bugreport.sun.com and each time, the submission FAIL. And of course you loose everything you entered in the page. Email to the address specified when it fail also FAIL. rejected by the
-
Adobe Lightroom 3.4 update process
Apparently, Adobe Lightroom uses Adobe Camera RAW for raw image processing just like Photoshop, however unlike Photoshop, every time that a new camera is added or a bug fixed in Lightroom's raw image processor, Adobe released an entirely new Lightroo