XML INVOICE Report RAXINV, Taxline is repeating for each invoice line
Hi Tim
Thanks a lot for your blog
Greeting !!
I have successfully created XML report for AR invoice Printing learning from your blog but stuck to a problem , whenever Invoice is having multiple lines ,say 20, then for each invoice line there is tax line printing 20 times like this:
PART NO.| CUSTOMER PART#/DESCRIPTION | UNIT PRICE | QUNTITY|
A123 | 34 WELD-ROD | 52 | 22 |
Tax Exempt @ 0.00
A234 | 238-AL WIER | 63 | 55 |
Tax Exempt @ 0.00
........ Assume there are 20 lines then tax line also repeating 20 times which i don't want .It should get printed only once if it is same
pls help me to achieve this
Thanks
Rahul
Thanks Tim for Your Instant reply.
I have gone through your duplicate line elimination but my requirement is not this
I'll explain it, I am using LINE_DESCRIPTION tag for printing item description and this tag have two value for it, when the LINE_TYPE =LINE then LINE_DESCRIPTION tag is printing the line description and if LINE_TYPE =TAX
then LINE_DESCRIPTION tag is printing the taxline information. Now if I have 20 lines in Invoice then the tax line will also repeat for 20 times, and if i use duplicate line elimination logic and I have same item it'll not print that item, some times whole invoice become blank.
So I want to print 20 lines and out of that 15 lines are have same tax rate then it should print once at the end of 15th line and for remaining 5 lines if tax rate is different for each line then it should print at the end of each line (5lines)
In the linetreevariable i used <xsl:variable xdofo:ctx="incontext" name="invLines" select=".//G_LINES [LINE_TYPE!='FREIGHT']"/> i.e. I want only line type=LINE and TAX
Thanks
Rahul
Similar Messages
-
Print Multiple copies of report, and resetting Page number for each copy.
Dear frnds!
i am using developer 6i reports i have a problem.
i want to Print Multiple copies of report, and resetting Page number for each copy" that is 4 copies of an invoice is required
1 - for user copy
2- gate copy
3- accounts office
4- office copy
any body please tell me the solution "i am using oracle 9i and developer 6i"
Thanx
IbrarHi,
I was wondering if you were able to get your multiple copies working? Below is what I have so far, just trying to get it to work before changing the actual template.
<?for-each-group@section:R5542520/Pick_Slips_Detail_Lines_S3;PickSlipNumber_ID260?>
<?variable@incontext:G1;R5542520/Pick_Slips_Detail_Lines_S3;PickSlipNumber_ID260?>
<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,3,1)?>
HEADER
PSN: <?$G1/Pick_Slip_Number_Display_ID54?>
PSN Detail: <?$G1/PickSlipNumber_ID260?>
Page 1 of 3
<?start:body?>
BODY
<?$G1/LineNumber_ID6?>
<?end body?>
FOOTER
<?end for-each?>
<?end for-each-group?>
XML:
<R5542520>
<Pick_Slips_Detail_Lines_S24>
<Header_Custom_Section_S24>
<Pick_Slip_Number_Display_ID54>123456</Pick_Slip_Number_Display_ID54>
<PickSlipNumber_ID260>123456</PickSlipNumber_ID260> -
How can i pull the payment transactions for each invoice?
Hi folks
iam developing report for following requirement.
want to disply the vendor transaction file for all company codes Fiscal year,of 2004,2005,2006, and 2007 (to date).
The purpose of oureport is to analyze our company invoices and investigate potential overpayment opportunities. In order to effectively accomplish this, we need a single invoice record for each invoice that was received by compnay from their vendors. The single invoice record would contain at least the following columns: Vendor Number, Vendor Invoice Number, Invoice Date, Invoice Amount, SAP Document Number, Check/Wire Number, Check/Wire Date, Check/Wire Amount. SAP would have multiple rows in a table for any one invoice, whereas we would only want to see ONE row for every vendor invoice.
if you know that company pays (for example) 75,000 invoices/year - then the transaction file you would have about 300,000 records in it. 75,000 Invoices * 4 years.
inodrer to develop this report iam using table PAYR -payee
BSIK ( closed items) BSAK ( open items).
my question is any one tell me how can write logic to pull the payment transactions for each invoice?
regards
neeruHi rob,
yes you are right, an invovice may contaion duplicate records
example PAYR table contain
invice no compnay code checkno vendor fisclyear
( doc.number)
2000134373 001 10287200 2007
2000134373 001 10427890 2007
so as per my requirement how can i write the logic.
regards
neeru -
How to create a separate invoice for each delivery line?
Hello,
Our customer is requesting a separate invoice for each delivery line. Is there a way to configure this? Or a customization?
Thanks,
JoyHello,
You need to do this through copy controls. in the transaction code VTFL, you need to develop a new routine and attach it in the area "Data VBRK/VBRP"
attach your custom designed routine and it will split the invoice according to each line item.
check the standard routines available for hints to develop the routine with your abap. there are several standard rotuines available
Hope this helps
Thanks
akasha -
Separate line item for each invoice in payment document
Dear Experts,
while making payment for a vendor through F-58 for multiple invoices, the system grouping the invoices on Business Area basis and giving the line items.
For example there are 2 invoices for 5000 and 6000 in one BA and another 2 for 4000 and 9000 in second BA, the system is generating the entry as follows
Vendor A/c Dr BA1 11000
Vendor A/c Dr BA2 13000
Bank A/c Cr 24000
I want the system to generate separate line item for each invoice instead of 2. How do i do it?
But this is not happening when i am making partial payment and in that case it is generating 4 line items.
regards
SureshThanks for the reply
Checked it but still it is working in the same way.
It is a requirement for the client, is there anyway to do it?
Regards
Suresh -
Separate clearing document for each invoice wise while posting F-36
Dear Experts
I am posting F-36 Bills of exchange transaction for invoices. I am receiving one BOE for multiple invoices.
Requirement is while saving document system should give separate clearing document for each invoice wise.
Pls guide me
Thanks in advance
SnehaHi,
It is not for dunning.
The F1 text for your understanding.
Key for Payment Grouping
Definition
The grouping key represents a rule according to which the open items of the account are to be grouped together for payment.
Use
The grouping key is used in cases where you do not want all the open items of a customer or a vendor to be paid together but rather you want only those items which belong together to be grouped into a single payment. A maximum of three fields from the open items are defined for every grouping key; the contents of these fields must correspond in order that the open items can be paid together.
Examples
If you use loan management, you can define as a rule that only items with same loan number can be collected together by debit memo.
Regards,
Ravi -
Handling withholding taxes for each invoices in DMEE
Hi,
I am doing DMEE(out going flat file) for argentina.
I need to dispaly alll wihthold taxes for each invoices.
Can any one know how to Process multiple line item in DMEE tree.
Here i am using Exit function.
I got all withholding items one table ,But how to i dispaly these item for each invoices.
This should look like this.
Header
Item1
Item2
Withhod tax1
withhold tax1
item1
item2
Withhod tax1
withhold tax1
Withhod tax3
Thanks,
Bala
Edited by: bala chandran on Dec 29, 2009 1:45 PM
Edited by: bala chandran on Dec 30, 2009 11:27 AM
Edited by: bala chandran on Jan 4, 2010 8:56 AMHi,
check this OSS Note:
https://service.sap.com/sap/support/notes/1286713
Best regards. -
Table name pls - ACH and wirepayment info,Payment amt for each invoice ,
can anyone tell me which table hold ACH and wire payment info.PAYR table will contain only check info.
Also i need which table is storing payment amt for each invoice..
Thanks in advance.
KumarHi KUmar,
See the tables,
REGUH, REGUS, REGUT, REGUV.
Regards,
Ravi -
Repeat for each artboard problem
I have a script that make makes guides around the edge of the artboard. It works fine when you only have one artboard but has issues when there are more. Can anyone see what's wrong here?
#target illustrator
var docRef = app.activeDocument;
var artboardRef = docRef.artboards;
//repeat for each artboard
for(i=0;i<artboardRef.length;i++){
//get artboard size
var left=artboardRef[i].artboardRect[0];
var top=artboardRef[i].artboardRect[1] ;
var right=artboardRef[i].artboardRect[2] ;
var bottom=artboardRef[i].artboardRect[3] ;
//create lines
var lineLeft = docRef.pathItems.add();
var lineRight = docRef.pathItems.add();
var lineTop = docRef.pathItems.add();
var lineBottom = docRef.pathItems.add();
//set line points
var leftmargin = (72);
var rightmargin = (72);
var topmargin = (72);
var bottommargin = (72);
//set line points
lineLeft.setEntirePath([[leftmargin, 0], [leftmargin, bottom]]);
lineRight.setEntirePath([[right - rightmargin, 0], [right - rightmargin, bottom]]);
lineTop.setEntirePath([[0, 0 - topmargin], [right, 0 - topmargin]]);
lineBottom.setEntirePath([[0, bottom + bottommargin], [right, bottom + bottommargin]]);
//make lines guides
lineLeft.guides = true;
lineRight.guides = true;
lineTop.guides = true;
lineBottom.guides = true;you have hard coded "0", it needs to be changed to variables, otherwise it will point to the same x or y coordinates
//set line points
lineLeft.setEntirePath([[left+leftmargin, top], [left+leftmargin, bottom]]);
lineRight.setEntirePath([[right - rightmargin, top], [right - rightmargin, bottom]]);
lineTop.setEntirePath([[left, top - topmargin], [right, top - topmargin]]);
lineBottom.setEntirePath([[left, bottom + bottommargin], [right, bottom + bottommargin]]); -
Output the requested delivery date for each different line item
Hello Experts
I have program called ZFSFSF(following), in the output Its showing multiple requested delvery dates per line item.
But We need to show the requested delivery date for each different line item.
Any code is highly appreciated. I wud appreacite if you cud bold the added code.
Thanks
SP
TYPE-POOLS: slis.
TABLES: vbap, vbrk, vbfa, vbak, vbrp, konv, kna1, bkpf, bsad, bkpf_bsad,
knvv, pa0002, t005u, mvke, lips, likp, vbpa, vbep.
DATA: BEGIN OF i_list OCCURS 0,
vbeln LIKE vbak-vbeln,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
erdat LIKE vbap-erdat,
mvgr1 LIKE mvke-mvgr1,
wadat_ist LIKE likp-wadat_ist,
days TYPE i,
werks LIKE vbap-werks,
lgort LIKE vbap-lgort,
kwmeng LIKE vbap-kwmeng," CH01+
lfimg LIKE lips-lfimg," CH01+
pstyv LIKE vbap-pstyv," CH01+
obd LIKE lips-vbeln," CH01+
obd_pos LIKE lips-posnr," CH01+
soldto LIKE vbaK-kunnr," JR+
shipto LIKE vbpa-kunnr," JR+
edatu like vbep-edatu," PR+
END OF i_list.
DATA: i_list2 LIKE i_list OCCURS 0 WITH HEADER LINE,
i_list3 LIKE i_list OCCURS 0 WITH HEADER LINE.
DATA: i_list4 LIKE vbap OCCURS 0 WITH HEADER LINE.
*ALV Output Header
DATA: gt_list_top_of_page TYPE slis_t_listheader,
prognm LIKE sy-repid,
gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
gt_events TYPE slis_t_event,
is_layout TYPE slis_layout_alv,
is_variant LIKE disvariant,
it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
DATA:gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA:gt_outtab LIKE i_list OCCURS 0 WITH HEADER LINE.
DATA: g_repid LIKE sy-repid,
g_count LIKE sy-tabix.
SELECTION-SCREEN BEGIN OF BLOCK block0 WITH FRAME TITLE text-t01.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(79) text-t10.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(79) text-t11.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(79) text-t12.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN END OF BLOCK block0.
*/ Selection and Input Parameters
SELECTION-SCREEN BEGIN OF BLOCK blocko WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_vbeln FOR vbap-vbeln, "SO
s_auart FOR vbak-auart DEFAULT 'KB' OBLIGATORY,
s_matnr FOR vbap-matnr," obligatory,
s_mvgr1 FOR mvke-mvgr1,
s_erdat FOR vbap-erdat OBLIGATORY,
s_werks FOR vbap-werks,
s_lgort FOR vbap-lgort,
s_edatu FOR vbep-edatu.
PARAMETERS: p_vkorg LIKE vbak-vkorg DEFAULT '5010'.
SELECTION-SCREEN SKIP 2.
+EC1
Addition +EC1
+EC1
PARAMETERS: p_vari LIKE disvariant-variant.
+EC1
End Addition +EC1
+EC1
SELECTION-SCREEN END OF BLOCK blocko.
+EC1
Addition +EC1
+EC1
DATA: g_save(1) TYPE c,
g_default(1) TYPE c,
g_exit(1) TYPE c,
gx_variant LIKE disvariant,
g_variant LIKE disvariant.
+EC1
End Addition +EC1
+EC1
Initialization fieldcatalog
INITIALIZATION.
PERFORM clear_tables.
g_repid = sy-repid.
PERFORM fieldcat_init USING gt_fieldcat[].
+EC1
Addition +EC1
+EC1
g_save = 'A'.
PERFORM variant_init.
Get default variant
gx_variant = g_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = gx_variant-variant.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
AT SELECTION-SCREEN.
PERFORM auth_check. "+ESC
PERFORM pai_of_selection_screen.
+EC1
End Addition +EC1
+EC1
START-OF-SELECTION.
PERFORM get_data.
PERFORM alv.
END-OF-SELECTION.
FORM get_data *
FORM get_data.
*CH01 - Added kwmeng(order qty) to selection, excluded rejects
*JR -added soldto and shipto code
SELECT avbeln aposnr amatnr aerdat awerks algort
akwmeng apstyv bkunnr cedatu
CH01+
INTO
(i_list-vbeln, i_list-posnr, i_list-matnr, i_list-erdat, i_list-werks,
i_list-lgort,
i_list-kwmeng , i_list-pstyv, i_list-soldto,i_list-edatu)
CH01+
FROM vbap AS a INNER JOIN vbak AS b ON avbeln = bvbeln
INNER JOIN vbep AS c ON avbeln = cvbeln
WHERE b~vkorg = p_vkorg
AND a~werks IN s_werks
AND a~lgort IN s_lgort
AND b~auart IN s_auart
AND a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~abgru = ''" CH01+
AND a~matnr IN s_matnr
AND c~edatu IN s_edatu.
APPEND i_list.
ENDSELECT.
COMMIT WORK AND WAIT.
LOOP AT i_list.
SELECT SINGLE mvgr1 INTO i_list-mvgr1 FROM mvke
WHERE matnr = i_list-matnr.
MODIFY i_list.
CLEAR: i_list.
ENDLOOP.
COMMIT WORK AND WAIT.
LOOP AT i_list.
IF i_list-mvgr1 IN s_mvgr1.
CONTINUE.
ELSE.
DELETE i_list.
COMMIT WORK AND WAIT.
ENDIF.
ENDLOOP.
CH01 - commented these lines out and redid logic below
LOOP AT i_list.
select single vbeln into lips-vbeln from lips
where vgbel = i_list-vbeln
and vgpos = i_list-posnr.
select single wadat_ist into i_list-wadat_ist from likp
where vbeln = lips-vbeln.
SELECT b~wadat_ist INTO i_list-wadat_ist
FROM lips AS a INNER JOIN
likp AS b ON avbeln = bvbeln WHERE a~vgbel = i_list-vbeln
AND a~vgpos = i_list-posnr.
MODIFY i_list.
CLEAR: i_list, lips-vbeln.
ENDSELECT.
ENDLOOP.
CH01 - Changed to select multiple delivery lines & del qty
summing the total deliveries per OBD# and date
LOOP AT i_list.
SELECT avbeln sum( alfimg ) b~wadat_ist
INTO (i_list-obd , i_list-lfimg , i_list-wadat_ist)
FROM lips AS a INNER JOIN
likp AS b ON avbeln = bvbeln WHERE a~vgbel = i_list-vbeln
AND a~vgpos = i_list-posnr
AND a~pstyv = i_list-pstyv
group by avbeln bwadat_ist.
i_list2 = i_list.
APPEND i_list2.
ENDSELECT.
IF sy-subrc <> 0.
i_list2 = i_list.
APPEND i_list2.
ENDIF.
ENDLOOP.
i_list[] = i_list2[].
*End CH01
COMMIT WORK AND WAIT.
LOOP AT i_list.
IF i_list-wadat_ist IS INITIAL.
CONTINUE.
ELSE.
i_list-days = i_list-wadat_ist - i_list-erdat.
ENDIF.
MODIFY i_list.
CLEAR: i_list.
COMMIT WORK AND WAIT.
ENDLOOP.
COMMIT WORK AND WAIT.
LOOP AT i_list.
IF i_list-vbeln IS INITIAL.
DELETE i_list.
ENDIF.
ENDLOOP.
COMMIT WORK AND WAIT.
*JR
LOOP AT i_list.
SELECT SINGLE KUNNR INTO i_list-shipto FROM vbpa
WHERE vbeln = i_list-vbeln
AND parvw = 'WE'.
MODIFY i_list.
ENDLOOP.
*END JR
gt_outtab[] = i_list[].
COMMIT WORK AND WAIT.
ENDFORM.
FORM alv *
FORM alv.
PERFORM e03_eventtab_build USING gt_events[]. "+EC1
PERFORM e04_comment_build USING gt_list_top_of_page[]. "+EC1
prognm = sy-repid. "+EC1
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_user_command = 'USER_COMMAND'
i_callback_program = g_repid
it_fieldcat = gt_fieldcat[]
it_events = gt_events[] "+ESC
it_sort = it_sort[]
+EC1
Addition +EC1
+EC1
is_variant = g_variant
i_save = g_save
+EC1
End Addition +EC1
+EC1
TABLES
t_outtab = gt_outtab.
COMMIT WORK AND WAIT.
ENDFORM.
FORM fieldcat_init *
--> I_FIELDCAT *
FORM fieldcat_init
USING i_fieldcat TYPE slis_t_fieldcat_alv.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
DATA: pos TYPE i VALUE 1.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'VBELN'.
ls_fieldcat-ref_tabname = 'VBAK'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'POSNR'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'MATNR'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'MVGR1'.
ls_fieldcat-ref_tabname = 'MVKE'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'WERKS'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'LGORT'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'ERDAT'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'WADAT_IST'.
ls_fieldcat-ref_tabname = 'LIKP'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'DAYS'.
ls_fieldcat-ref_fieldname = 'DAYS'.
ls_fieldcat-seltext_s = '# Of Days'.
ls_fieldcat-seltext_m = '# Of Days'.
ls_fieldcat-seltext_l = '# Of Days'.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
*Begin CH01
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'KWMENG'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-outputlen = 7.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'LFIMG'.
ls_fieldcat-ref_tabname = 'LIPS'.
ls_fieldcat-outputlen = 7.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'OBD'.
ls_fieldcat-seltext_s = 'OBD'.
ls_fieldcat-seltext_m = 'Outbound Del'.
ls_fieldcat-seltext_l = 'Outbound Delivery'.
ls_fieldcat-outputlen = 10.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'OBD_POS'.
ls_fieldcat-seltext_s = 'OBD Ln'.
ls_fieldcat-seltext_m = 'Outbound Del Ln'.
ls_fieldcat-seltext_l = 'Outbound Del Line'.
ls_fieldcat-outputlen = 10.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
*End CH01
*JR
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'SOLDTO'.
ls_fieldcat-ref_tabname = 'VBAP'.
ls_fieldcat-seltext_m = 'Sold To'.
ls_fieldcat-seltext_l = 'Sold To'.
ls_fieldcat-outputlen = 10.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'SHIPTO'.
ls_fieldcat-ref_tabname = 'VBPA'.
ls_fieldcat-seltext_m = 'Ship To'.
ls_fieldcat-seltext_l = 'Ship To'.
ls_fieldcat-outputlen = 10.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
*END JR
ls_fieldcat-col_pos = pos.
ls_fieldcat-fieldname = 'EDATU'.
ls_fieldcat-ref_tabname = 'VBEP'.
ls_fieldcat-seltext_m = 'Requested Delivery date'.
ls_fieldcat-seltext_l = 'Requested Delivery date'.
ls_fieldcat-outputlen = 20.
APPEND ls_fieldcat TO i_fieldcat.
CLEAR ls_fieldcat.
*FOR ALV SORT & SUBTOTAL
CLEAR it_sort.
it_sort-spos = '0'.
it_sort-fieldname = 'VBELN'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '1'.
it_sort-fieldname = 'POSNR'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '2'.
it_sort-fieldname = 'MATNR'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '3'.
it_sort-fieldname = 'MVGR1'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '4'.
it_sort-fieldname = 'ERDAT'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '5'.
it_sort-fieldname = 'WADAT_IST'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-down = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '6'.
it_sort-fieldname = 'PERNR'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '7'.
it_sort-fieldname = 'VORNA'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '8'.
it_sort-fieldname = 'NACHN'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '9'.
it_sort-fieldname = 'VKGRP'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '10'.
it_sort-fieldname = 'VBELN'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '11'.
it_sort-fieldname = 'ERDAT'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
CLEAR it_sort.
it_sort-spos = '12'.
it_sort-fieldname = 'BEZEI'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
it_sort-subtot = 'X'.
APPEND it_sort.
clear it_sort.
it_sort-spos = '1'.
it_sort-fieldname = 'BELNR'.
it_sort-tabname = 'GT_OUTTAB'.
it_sort-up = 'X'.
append it_sort.
ENDFORM.
+EC1
Addition +EC1
+EC1
*& Form VARIANT_INIT
text
--> p1 text
<-- p2 text
FORM variant_init.
CLEAR g_variant.
g_variant-report = g_repid.
ENDFORM. " VARIANT_INIT
FORM f4_for_variant *
FORM f4_for_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save = g_save
it_default_fieldcat =
IMPORTING
e_exit = g_exit
es_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF g_exit = space.
p_vari = gx_variant-variant.
ENDIF.
ENDIF.
ENDFORM.
*& Form PAI_OF_SELECTION_SCREEN
text
FORM pai_of_selection_screen.
IF NOT p_vari IS INITIAL.
MOVE g_variant TO gx_variant.
MOVE p_vari TO gx_variant-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant.
g_variant = gx_variant.
ELSE.
PERFORM variant_init.
ENDIF.
ENDFORM. " PAI_OF_SELECTION_SCREEN
+EC1
End Addition +EC1
+EC1
FORM e03_eventtab_build *
--> E03_LT_EVENTS *
FORM e03_eventtab_build USING e03_lt_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = e03_lt_events.
READ TABLE e03_lt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE gc_formname_top_of_page TO ls_event-form.
APPEND ls_event TO e03_lt_events.
ENDIF.
ENDFORM.
FORM e04_comment_build *
--> E04_LT_TOP_OF_PAGE *
FORM e04_comment_build USING e04_lt_top_of_page TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader.
*Report Title
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = text-007.
APPEND ls_line TO e04_lt_top_of_page.
**Doc Type Desc.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-008.
ls_line-info = p_matnr.
append ls_line to e04_lt_top_of_page.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-009.
ls_line-info = p_werks.
append ls_line to e04_lt_top_of_page.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-010.
ls_line-info = p_stlan.
append ls_line to e04_lt_top_of_page.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-011.
ls_line-info = p_stlal.
append ls_line to e04_lt_top_of_page.
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = text-012.
ls_line-info = p_stlal.
append ls_line to e04_lt_top_of_page.
ENDFORM.
FORM top_of_page *
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_list_top_of_page.
ENDFORM.
FORM auth_check *
FORM auth_check.
AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'
ID 'VKORG' FIELD p_vkorg.
IF sy-subrc NE 0.
MESSAGE e054 WITH p_vkorg.
ENDIF.
ENDFORM. " auth_check
*& Form USER_COMMAND
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
PERFORM display_so_order USING r_ucomm
rs_selfield.
ENDCASE.
ENDFORM.
*& Form display_sales_order
text
-->P_R_UCOMM text
-->P_RS_SELFIELD text
FORM display_so_order USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE rs_selfield-sel_tab_field.
WHEN '1-VBELN'.
SET PARAMETER ID 'AUN' FIELD rs_selfield-value.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
WHEN '1-MATNR'.
SET PARAMETER ID 'MAT' FIELD rs_selfield-value.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
WHEN '1-OBD'.
SET PARAMETER ID 'VL' FIELD rs_selfield-value.
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
WHEN OTHERS.
MESSAGE i000(z1) WITH 'Please Click on the Valid Selection'.
EXIT.
ENDCASE.
ENDFORM. " display_sales_order
FORM EDit_table *> TYPE-POOLS: slis.
>
> TABLES: vbap, vbrk, vbfa, vbak, vbrp, konv, kna1,
> bkpf, bsad, bkpf_bsad,
> knvv, pa0002, t005u, mvke, lips, likp, vbpa, vbep.
>
> DATA: BEGIN OF i_list OCCURS 0,
> vbeln LIKE vbak-vbeln,
> posnr LIKE vbap-posnr,
<b> etenr like vbep-etenr,</b>
> matnr LIKE vbap-matnr,
> erdat LIKE vbap-erdat,
> mvgr1 LIKE mvke-mvgr1,
> wadat_ist LIKE likp-wadat_ist,
> days TYPE i,
> werks LIKE vbap-werks,
> lgort LIKE vbap-lgort,
> kwmeng LIKE vbap-kwmeng," CH01+
> lfimg LIKE lips-lfimg," CH01+
> pstyv LIKE vbap-pstyv," CH01+
> obd LIKE lips-vbeln," CH01+
> obd_pos LIKE lips-posnr," CH01+
> soldto LIKE vbaK-kunnr," JR+
> shipto LIKE vbpa-kunnr," JR+
> edatu like vbep-edatu," PR+
> END OF i_list.
>
> DATA: i_list2 LIKE i_list OCCURS 0 WITH HEADER LINE,
> i_list3 LIKE i_list OCCURS 0 WITH HEADER LINE.
>
> DATA: i_list4 LIKE vbap OCCURS 0 WITH HEADER LINE.
>
>
> *ALV Output Header
> DATA: gt_list_top_of_page TYPE slis_t_listheader,
> prognm LIKE sy-repid,
> gc_formname_top_of_page TYPE slis_formname VALUE
> 'TOP_OF_PAGE',
> gt_events TYPE slis_t_event,
> is_layout TYPE slis_layout_alv,
> is_variant LIKE disvariant,
> it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
>
> DATA:gt_fieldcat TYPE slis_t_fieldcat_alv.
> DATA:gt_outtab LIKE i_list OCCURS 0 WITH HEADER
> LINE.
>
> DATA: g_repid LIKE sy-repid,
> g_count LIKE sy-tabix.
>
> SELECTION-SCREEN BEGIN OF BLOCK block0 WITH FRAME
> TITLE text-t01.
>
> SELECTION-SCREEN: BEGIN OF LINE.
> SELECTION-SCREEN COMMENT 1(79) text-t10.
>
> SELECTION-SCREEN: END OF LINE.
>
> SELECTION-SCREEN: BEGIN OF LINE.
> SELECTION-SCREEN COMMENT 1(79) text-t11.
> SELECTION-SCREEN: END OF LINE.
>
> SELECTION-SCREEN: BEGIN OF LINE.
> SELECTION-SCREEN COMMENT 1(79) text-t12.
> SELECTION-SCREEN: END OF LINE.
>
> SELECTION-SCREEN END OF BLOCK block0.
>
> */ Selection and Input Parameters
> SELECTION-SCREEN BEGIN OF BLOCK blocko WITH FRAME
> TITLE text-001.
>
>
>
> SELECT-OPTIONS: s_vbeln FOR vbap-vbeln, "SO
> s_auart FOR vbak-auart DEFAULT 'KB' OBLIGATORY,
> s_matnr FOR vbap-matnr," obligatory,
> s_mvgr1 FOR mvke-mvgr1,
> s_erdat FOR vbap-erdat OBLIGATORY,
> s_werks FOR vbap-werks,
> s_lgort FOR vbap-lgort,
> s_edatu FOR vbep-edatu.
>
> PARAMETERS: p_vkorg LIKE vbak-vkorg DEFAULT '5010'.
>
>
>
> SELECTION-SCREEN SKIP 2.
> *----
> -
+EC1
> * Addition +EC1
> *----
> -
+EC1
> PARAMETERS: p_vari LIKE disvariant-variant.
> *----
> -
+EC1
> * End Addition +EC1
> *----
> -
+EC1
> SELECTION-SCREEN END OF BLOCK blocko.
>
> *----
> -
+EC1
> * Addition +EC1
> *----
> -
+EC1
> DATA: g_save(1) TYPE c,
> * g_default(1) TYPE c,
> g_exit(1) TYPE c,
> gx_variant LIKE disvariant,
> g_variant LIKE disvariant.
> *----
> -
+EC1
> * End Addition +EC1
> *----
> -
+EC1
>
> * Initialization fieldcatalog
> INITIALIZATION.
>
> * PERFORM clear_tables.
>
> g_repid = sy-repid.
> PERFORM fieldcat_init USING gt_fieldcat[].
> *----
> -
+EC1
> * Addition +EC1
> *----
> -
+EC1
> g_save = 'A'.
> PERFORM variant_init.
> * Get default variant
> gx_variant = g_variant.
> CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
> EXPORTING
> i_save = g_save
> CHANGING
> cs_variant = gx_variant
> EXCEPTIONS
> not_found = 2.
> IF sy-subrc = 0.
> p_vari = gx_variant-variant.
> ENDIF.
>
> AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
> PERFORM f4_for_variant.
>
> AT SELECTION-SCREEN.
> PERFORM auth_check. "+ESC
> PERFORM pai_of_selection_screen.
>
>
>
> *----
> -
+EC1
> * End Addition +EC1
> *----
> -
+EC1
>
>
> START-OF-SELECTION.
>
> PERFORM get_data.
>
> PERFORM alv.
>
> END-OF-SELECTION.
>
> *----
> -
> * FORM get_data *
> *----
> -
> * ........ *
> *----
> -
> FORM get_data.
> *CH01 - Added kwmeng(order qty) to selection,
> excluded rejects
> *JR -added soldto and shipto code
SELECT a~vbeln a~posnr a~matnr a~erdat a~werks a~lgort
a~kwmeng a~pstyv b~kunnr c~edatu
CH01+
INTO corresponding fields of table i_list
FROM vbap AS a INNER JOIN vbak AS b ON a~vbeln = b~vbeln
INNER JOIN vbep AS c ON a~vbeln = c~vbeln
and a~posnr = c~posnr
WHERE b~vkorg = p_vkorg
AND a~werks IN s_werks
AND a~lgort IN s_lgort
AND b~auart IN s_auart
AND a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~abgru = ''" CH01+
AND a~matnr IN s_matnr
AND c~edatu IN s_edatu.
> COMMIT WORK AND WAIT.
>
> LOOP AT i_list.
> SELECT SINGLE mvgr1 INTO i_list-mvgr1 FROM mvke
> WHERE matnr = i_list-matnr.
> MODIFY i_list.
> CLEAR: i_list.
> ENDLOOP.
> COMMIT WORK AND WAIT.
>
> LOOP AT i_list.
> IF i_list-mvgr1 IN s_mvgr1.
> CONTINUE.
> ELSE.
> DELETE i_list.
> COMMIT WORK AND WAIT.
> ENDIF.
> ENDLOOP.
> * CH01 - commented these lines out and redid logic
> below
> * LOOP AT i_list.
> ** select single vbeln into lips-vbeln from lips
> ** where vgbel = i_list-vbeln
> ** and vgpos = i_list-posnr.
> **
> ** select single wadat_ist into i_list-wadat_ist from
> likp
> ** where vbeln = lips-vbeln.
> *
> * SELECT b~wadat_ist INTO i_list-wadat_ist
> * FROM lips AS a INNER JOIN
> * likp AS b ON a~vbeln = b~vbeln WHERE a~vgbel =
> i_list-vbeln
> * AND a~vgpos = i_list-posnr.
> * MODIFY i_list.
> * CLEAR: i_list, lips-vbeln.
> * ENDSELECT.
> * ENDLOOP.
>
> * CH01 - Changed to select multiple delivery lines &
> del qty
> * summing the total deliveries per OBD# and date
> LOOP AT i_list.
> SELECT avbeln sum( alfimg ) b~wadat_ist
> INTO (i_list-obd , i_list-lfimg , i_list-wadat_ist)
> FROM lips AS a INNER JOIN
> likp AS b ON avbeln = bvbeln WHERE a~vgbel =
> i_list-vbeln
> AND a~vgpos = i_list-posnr
> AND a~pstyv = i_list-pstyv
> group by avbeln bwadat_ist.
> i_list2 = i_list.
> APPEND i_list2.
> ENDSELECT.
> IF sy-subrc <> 0.
> i_list2 = i_list.
> APPEND i_list2.
> ENDIF.
> ENDLOOP.
> i_list[] = i_list2[].
> *End CH01
>
> COMMIT WORK AND WAIT.
>
> LOOP AT i_list.
> IF i_list-wadat_ist IS INITIAL.
> CONTINUE.
> ELSE.
> i_list-days = i_list-wadat_ist - i_list-erdat.
> ENDIF.
> MODIFY i_list.
> CLEAR: i_list.
> COMMIT WORK AND WAIT.
> ENDLOOP.
>
> COMMIT WORK AND WAIT.
>
> LOOP AT i_list.
> IF i_list-vbeln IS INITIAL.
> DELETE i_list.
> ENDIF.
> ENDLOOP.
> COMMIT WORK AND WAIT.
>
> *JR
> LOOP AT i_list.
> SELECT SINGLE KUNNR INTO i_list-shipto FROM vbpa
> WHERE vbeln = i_list-vbeln
> AND parvw = 'WE'.
> MODIFY i_list.
> ENDLOOP.
> *END JR
>
> gt_outtab[] = i_list[].
> COMMIT WORK AND WAIT.
>
>
> ENDFORM.
>
> *----
> -
> * FORM alv *
> *----
> -
> * ........ *
> *----
> -
> FORM alv.
>
> PERFORM e03_eventtab_build USING gt_events[]. "+EC1
> PERFORM e04_comment_build USING
> gt_list_top_of_page[]. "+EC1
> prognm = sy-repid. "+EC1
>
>
> CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
> EXPORTING
> i_callback_user_command = 'USER_COMMAND'
> i_callback_program = g_repid
> it_fieldcat = gt_fieldcat[]
> it_events = gt_events[] "+ESC
> it_sort = it_sort[]
> *----
> -
+EC1
> * Addition +EC1
> *----
> -
+EC1
> is_variant = g_variant
> i_save = g_save
> *----
> -
+EC1
> * End Addition +EC1
> *----
> -
+EC1
> TABLES
> t_outtab = gt_outtab.
>
> COMMIT WORK AND WAIT.
>
>
> ENDFORM.
>
>
> *----
> -
> * FORM fieldcat_init *
> *----
> -
> * ........ *
> *----
> -
> * --> I_FIELDCAT *
> *----
> -
> FORM fieldcat_init
> USING i_fieldcat TYPE slis_t_fieldcat_alv.
> DATA: ls_fieldcat TYPE slis_fieldcat_alv.
> DATA: pos TYPE i VALUE 1.
> CLEAR ls_fieldcat.
<b>Please note to keep on incrementing pos variable for column position.</b>
<b> pos = pos + 1.</b>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'VBELN'.
> ls_fieldcat-ref_tabname = 'VBAK'.
> ls_fieldcat-key = 'X'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
<b> pos = pos + 1.</b> ===> after every append to field catalog.
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'POSNR'.
> ls_fieldcat-ref_tabname = 'VBAP'.
> ls_fieldcat-key = 'X'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
<b>> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'ETERN'.
> ls_fieldcat-ref_tabname = 'VBEP'.
> ls_fieldcat-key = 'X'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.</b>
>
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'MATNR'.
> ls_fieldcat-ref_tabname = 'VBAP'.
> ls_fieldcat-key = 'X'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'MVGR1'.
> ls_fieldcat-ref_tabname = 'MVKE'.
> ls_fieldcat-key = 'X'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'WERKS'.
> ls_fieldcat-ref_tabname = 'VBAP'.
> * ls_fieldcat-key = 'X'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'LGORT'.
> ls_fieldcat-ref_tabname = 'VBAP'.
> * ls_fieldcat-key = 'X'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'ERDAT'.
> ls_fieldcat-ref_tabname = 'VBAP'.
> * ls_fieldcat-key = 'X'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'WADAT_IST'.
> ls_fieldcat-ref_tabname = 'LIKP'.
> * ls_fieldcat-key = 'X'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'DAYS'.
> ls_fieldcat-ref_fieldname = 'DAYS'.
> ls_fieldcat-seltext_s = '# Of Days'.
> ls_fieldcat-seltext_m = '# Of Days'.
> ls_fieldcat-seltext_l = '# Of Days'.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
> *Begin CH01
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'KWMENG'.
> ls_fieldcat-ref_tabname = 'VBAP'.
> ls_fieldcat-outputlen = 7.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'LFIMG'.
> ls_fieldcat-ref_tabname = 'LIPS'.
> ls_fieldcat-outputlen = 7.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'OBD'.
> ls_fieldcat-seltext_s = 'OBD'.
> ls_fieldcat-seltext_m = 'Outbound Del'.
> ls_fieldcat-seltext_l = 'Outbound Delivery'.
> ls_fieldcat-outputlen = 10.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
> * ls_fieldcat-col_pos = pos.
> * ls_fieldcat-fieldname = 'OBD_POS'.
> * ls_fieldcat-seltext_s = 'OBD Ln'.
> * ls_fieldcat-seltext_m = 'Outbound Del Ln'.
> * ls_fieldcat-seltext_l = 'Outbound Del Line'.
> * ls_fieldcat-outputlen = 10.
> * APPEND ls_fieldcat TO i_fieldcat.
> * CLEAR ls_fieldcat.
> *
> *End CH01
>
> *JR
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'SOLDTO'.
> ls_fieldcat-ref_tabname = 'VBAP'.
> ls_fieldcat-seltext_m = 'Sold To'.
> ls_fieldcat-seltext_l = 'Sold To'.
> ls_fieldcat-outputlen = 10.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'SHIPTO'.
> ls_fieldcat-ref_tabname = 'VBPA'.
> ls_fieldcat-seltext_m = 'Ship To'.
> ls_fieldcat-seltext_l = 'Ship To'.
> ls_fieldcat-outputlen = 10.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
> *END JR
>
> ls_fieldcat-col_pos = pos.
> ls_fieldcat-fieldname = 'EDATU'.
> ls_fieldcat-ref_tabname = 'VBEP'.
> ls_fieldcat-seltext_m = 'Requested Delivery date'.
> ls_fieldcat-seltext_l = 'Requested Delivery date'.
> ls_fieldcat-outputlen = 20.
> APPEND ls_fieldcat TO i_fieldcat.
> CLEAR ls_fieldcat.
>
>
> *FOR ALV SORT & SUBTOTAL
> CLEAR it_sort.
> it_sort-spos = '0'.
> it_sort-fieldname = 'VBELN'.
> it_sort-tabname = 'GT_OUTTAB'.
> it_sort-up = 'X'.
> * it_sort-subtot = 'X'.
> APPEND it_sort.
>
> CLEAR it_sort.
> it_sort-spos = '1'.
> it_sort-fieldname = 'POSNR'.
> it_sort-tabname = 'GT_OUTTAB'.
> it_sort-up = 'X'.
> it_sort-subtot = 'X'.
> * it_sort-subtot = 'X'.
> APPEND it_sort.
> *
> CLEAR it_sort.
> it_sort-spos = '2'.
> it_sort-fieldname = 'MATNR'.
> it_sort-tabname = 'GT_OUTTAB'.
> it_sort-up = 'X'.
> * it_sort-subtot = 'X'.
> APPEND it_sort.
>
> CLEAR it_sort.
> it_sort-spos = '3'.
> it_sort-fieldname = 'MVGR1'.
> it_sort-tabname = 'GT_OUTTAB'.
> it_sort-up = 'X'.
> * it_sort-subtot = 'X'.
> APPEND it_sort.
> *
> CLEAR it_sort.
> it_sort-spos = '4'.
> it_sort-fieldname = 'ERDAT'.
> it_sort-tabname = 'GT_OUTTAB'.
> it_sort-up = 'X'.
> * it_sort-subtot = 'X'.
> APPEND it_sort.
>
>
> CLEAR it_sort.
> it_sort-spos = '5'.
> it_sort-fieldname = 'WADAT_IST'.
> it_sort-tabname = 'GT_OUTTAB'.
> it_sort-down = 'X'.
> * it_sort-subtot = 'X'.
> APPEND it_sort.
>
> *
> * CLEAR it_sort.
> * it_sort-spos = '6'.
> * it_sort-fieldname = 'PERNR'.
> * it_sort-tabname = 'GT_OUTTAB'.
> * it_sort-up = 'X'.
> ** it_sort-subtot = 'X'.
> * APPEND it_sort.
> *
> *
> * CLEAR it_sort.
> * it_sort-spos = '7'.
> * it_sort-fieldname = 'VORNA'.
> * it_sort-tabname = 'GT_OUTTAB'.
> * it_sort-up = 'X'.
> ** it_sort-subtot = 'X'.
> * APPEND it_sort.
> *
> * CLEAR it_sort.
> * it_sort-spos = '8'.
> * it_sort-fieldname = 'NACHN'.
> * it_sort-tabname = 'GT_OUTTAB'.
> * it_sort-up = 'X'.
> ** it_sort-subtot = 'X'.
> * APPEND it_sort.
> *
> * CLEAR it_sort.
> * it_sort-spos = '9'.
> * it_sort-fieldname = 'VKGRP'.
> * it_sort-tabname = 'GT_OUTTAB'.
> * it_sort-up = 'X'.
> ** it_sort-subtot = 'X'.
> * APPEND it_sort.
> *
> * CLEAR it_sort.
> * it_sort-spos = '10'.
> * it_sort-fieldname = 'VBELN'.
> * it_sort-tabname = 'GT_OUTTAB'.
> * it_sort-up = 'X'.
> ** it_sort-subtot = 'X'.
> * APPEND it_sort.
> *
> * CLEAR it_sort.
> * it_sort-spos = '11'.
> * it_sort-fieldname = 'ERDAT'.
> * it_sort-tabname = 'GT_OUTTAB'.
> * it_sort-up = 'X'.
> ** it_sort-subtot = 'X'.
> * APPEND it_sort.
> *
> * CLEAR it_sort.
> * it_sort-spos = '12'.
> * it_sort-fieldname = 'BEZEI'.
> * it_sort-tabname = 'GT_OUTTAB'.
> * it_sort-up = 'X'.
> ** it_sort-subtot = 'X'.
> * APPEND it_sort.
> *
>
> * clear it_sort.
> * it_sort-spos = '1'.
> * it_sort-fieldname = 'BELNR'.
> * it_sort-tabname = 'GT_OUTTAB'.
> * it_sort-up = 'X'.
> * append it_sort.
>
>
> ENDFORM.
>
> *----
> -
+EC1
> * Addition +EC1
> *----
> -
+EC1
> *&----
> -
> *& Form VARIANT_INIT
> *&----
> -
> * text
> *----
> -
> * --> p1 text
> * <-- p2 text
> *----
> -
> FORM variant_init.
> *
> CLEAR g_variant.
> g_variant-report = g_repid.
> ENDFORM. " VARIANT_INIT
>
>
>
> *----
> -
> * FORM f4_for_variant *
> *----
> -
> * ........ *
> *----
> -
> FORM f4_for_variant.
> *
> CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
> EXPORTING
> is_variant = g_variant
> i_save = g_save
> * it_default_fieldcat =
> IMPORTING
> e_exit = g_exit
> es_variant = gx_variant
> EXCEPTIONS
> not_found = 2.
> IF sy-subrc = 2.
> MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
> WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
> ELSE.
> IF g_exit = space.
> p_vari = gx_variant-variant.
> ENDIF.
> ENDIF.
> ENDFORM.
> *&----
> -
> *& Form PAI_OF_SELECTION_SCREEN
> *&----
> -
> * text
> *----
> -
> FORM pai_of_selection_screen.
> *
> IF NOT p_vari IS INITIAL.
> MOVE g_variant TO gx_variant.
> MOVE p_vari TO gx_variant-variant.
> CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
> EXPORTING
> i_save = g_save
> CHANGING
> cs_variant = gx_variant.
> g_variant = gx_variant.
> ELSE.
> PERFORM variant_init.
> ENDIF.
> ENDFORM. " PAI_OF_SELECTION_SCREEN
> *----
> -
+EC1
> * End Addition +EC1
> *----
> -
+EC1
>
>
> *----
> -
> * FORM e03_eventtab_build *
> *----
> -
> * ........ *
> *----
> -
> * --> E03_LT_EVENTS *
> *----
> -
> FORM e03_eventtab_build USING e03_lt_events TYPE
> slis_t_event.
> DATA: ls_event TYPE slis_alv_event.
>
> CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
> EXPORTING
> i_list_type = 0
> IMPORTING
> et_events = e03_lt_events.
> READ TABLE e03_lt_events WITH KEY name =
> slis_ev_top_of_page
> INTO ls_event.
> IF sy-subrc = 0.
> MOVE gc_formname_top_of_page TO ls_event-form.
> APPEND ls_event TO e03_lt_events.
> ENDIF.
> ENDFORM.
>
> *----
> -
> * FORM e04_comment_build *
> *----
> -
> * ........ *
> *----
> -
> * --> E04_LT_TOP_OF_PAGE *
> *----
> -
> FORM e04_comment_build USING e04_lt_top_of_page TYPE
> slis_t_listheader.
> DATA: ls_line TYPE slis_listheader.
>
> *Report Title
> CLEAR ls_line.
> ls_line-typ = 'H'.
> ls_line-info = text-007.
> APPEND ls_line TO e04_lt_top_of_page.
> *
> *
> **Doc Type Desc.
> * clear ls_line.
> * ls_line-typ = 'S'.
> * ls_line-key = text-008.
> ** ls_line-info = p_matnr.
> * append ls_line to e04_lt_top_of_page.
> *
> * clear ls_line.
> * ls_line-typ = 'S'.
> * ls_line-key = text-009.
> ** ls_line-info = p_werks.
> * append ls_line to e04_lt_top_of_page.
> *
> *
> * clear ls_line.
> * ls_line-typ = 'S'.
> * ls_line-key = text-010.
> ** ls_line-info = p_stlan.
> * append ls_line to e04_lt_top_of_page.
> *
> * clear ls_line.
> * ls_line-typ = 'S'.
> * ls_line-key = text-011.
> ** ls_line-info = p_stlal.
> * append ls_line to e04_lt_top_of_page.
> *
> * clear ls_line.
> * ls_line-typ = 'S'.
> * ls_line-key = text-012.
> ** ls_line-info = p_stlal.
> * append ls_line to e04_lt_top_of_page.
>
>
>
> ENDFORM.
>
> *----
> -
> * FORM top_of_page *
> *----
> -
> * ........ *
> *----
> -
> FORM top_of_page.
>
> CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
> EXPORTING
> it_list_commentary = gt_list_top_of_page.
>
>
> ENDFORM.
>
> *----
> -
> * FORM auth_check *
> *----
> -
> * ........ *
> *----
> -
> FORM auth_check.
>
> AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'
> ID 'VKORG' FIELD p_vkorg.
> IF sy-subrc NE 0.
> MESSAGE e054 WITH p_vkorg.
> ENDIF.
>
>
> ENDFORM. " auth_check
>
>
> *&----
> -
> *& Form USER_COMMAND
> *&----
> -
> FORM user_command USING r_ucomm LIKE sy-ucomm
> rs_selfield TYPE slis_selfield.
>
> CASE r_ucomm.
> WHEN '&IC1'.
> PERFORM display_so_order USING r_ucomm
> rs_selfield.
>
> ENDCASE.
>
> ENDFORM.
>
> *&----
> -
> *& Form display_sales_order
> *&----
> -
> * text
> *----
> -
> * -->P_R_UCOMM text
> * -->P_RS_SELFIELD text
> *----
> -
> FORM display_so_order USING r_ucomm LIKE sy-ucomm
> rs_selfield TYPE slis_selfield.
>
> CASE rs_selfield-sel_tab_field.
> WHEN '1-VBELN'.
> SET PARAMETER ID 'AUN' FIELD rs_selfield-value.
> CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
> WHEN '1-MATNR'.
> SET PARAMETER ID 'MAT' FIELD rs_selfield-value.
> CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
> WHEN '1-OBD'.
> SET PARAMETER ID 'VL' FIELD rs_selfield-value.
> CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
> WHEN OTHERS.
> MESSAGE i000(z1) WITH 'Please Click on the Valid
> Selection'.
> EXIT.
> ENDCASE.
>
>
> ENDFORM. " display_sales_order
>
> *----
> -
> * FORM EDit_table *
> *----
> -
> * ........ *
> *----
> -
Message was edited by: Anurag Bankley -
Public API's to create delivery for each delivery line
I've requirement to create unique delivery for each delivery line using API. Can any body use public API to meet this requirement. Please ! any idea and thought !
R12.
Thanks in Advance,
RamanaTry the WSH_DELIVERIES_PUB.Create_Update_Delivery API. The API creates a new delivery record or updates an existing delivery record in WSH_NEW_DELIVERIES table. The DELIVERY_ID, NAME and return status of a new delivery are passed as OUT parameters, while the DELIVERY_ID or NAME of an existing delivery for update is passed as an IN parameter.
Pass IN parameter p_action_code value UPDATE ---> incase you want to update existing delivery.
Pass IN parameter p_action_code value CREATE --> incase you want to create a new dleivery.
Parameter Usage Type Required
p_api_version_number IN Number x
p_init_msg_list IN Varchar2 -
x_return_status OUT Varchar2 -
x_msg_count OUT Number -
x_msg_data OUT Varchar2 -
p_action_code IN Varchar2 x
p_delivery_info IN OUT Record x
p_delivery_name IN Varchar2 -
x_delivery_id OUT Number -
x_name OUT Varchar2 -
I hope all this infor. comes handy.
-Dhawang -
Split delivery for each schedule line
Hi,
We have a requirement to split deliveries for each schedule line in the order.
For example: I have an order with one line item which has 2 schedule lines. If the schedule line date on one is 01/29 & the other is on 01/31, and the delivery due list VL10A is run with a range 01/29 - 01/31, it picks both the schedule line & combines them into one delivery.
Is there a way by which we can force them to create 2 different deliveries (as it would if the delivery due list was run for each day at a time).
We created a data transfer routine (deliveries), and populating ZUKRL with schedule line date & that doesnt solve the problem since the routine is triggered once for each sales order line and not for schedule lines.
SAP reverted back that this is standard SAP behaviour to cumulate all due schedule lines into one delivery, but I would like to know if anyone has any other solution ?
Thanks in advance!First of all you have to use VL10E to create deliveries, since it creates one delivery item for each schedule line.
Then play with your own delivery role copied from standard profile 0201:
you can trigger 3 different flags to reach your goal:
Cumul. Rule: Rule for calculation of quantity to be delivered
There is a field that contains a cumulated quantity in delivery lists
with item or schedule line views. The quantity at which the list line
(document item or schedule line) is delivered is defined in this field
when it is selected and the delivery process is started in the
background. The value is a default and can be changed by manually
processing the delivery list on the item or schedule line level.
SplitSchedLine: Rule for creating one delivery item per schedule line
In a delivery list in item view with multiple schedule lines, you can
decide for the same document item whether you want to generate one
delivery item per schedule line or whether you want to deliver the
cumulated quantity of the last schedule lines selected.
LimitSchedLine: Allow constraints on schedule line level
You can use this indicator to limit selection o
delivery when
o Delivery due date and/or
o Planned goods issue date and/or
o Route schedule
does not fall within selection range.
This should help you to solve your problem.
pls. reward points if helpful
Regards
Roberto -
How to call the XML Publisher Report thro Standard PO Output for Comm.
Hi
We need to call our custom report(XML Publisher Report) from the standard PO Output for Communication Report.
There is a parameter(Purchase Order Layout) in PO Output for Communication in which we can see no. of standard reports. We want to add our custom report in that list so that when we will run this standard report by selecting our custom report for Purchase Order Layout parameter, we should get the output as per our Custom report.
Since PO Output for Communication is a Java Concurrent Program, we are not able to place our custom report in the list of Purchase Order layout Parameter.
RamWelcome to the forums !
Pl see if MOS Doc 305307.1 (How To Modify Print PO Report POXPOPDF With Custom Template) can help
HTH
Srini -
XML shows multiple po distributions account for each po line item
Hi, We have custome RDF created for Purchase Order Detail Report. Per the PO summary report, PO nubmer 30367 has two lines and each on has single distributions. Each line has different distributions. Line 1distribution account: 01.000.105.65020.00000.00 and Line 2 distribution account: 01.000.000.15020.00000.00. However when I run the XML for PO summary report, each line items contains the two account distributions. How do you make it sho it only show the account distribution pertain to the each line?
**Please see xml below.**
- <LIST_G_COMPANY>
- <G_COMPANY>
<C_COMPANY>CTI US Ledger</C_COMPANY>
<C_ORGANIZATION_ID>83</C_ORGANIZATION_ID>
<GL_CURRENCY>USD</GL_CURRENCY>
<STRUCTURE_ACC>101</STRUCTURE_ACC>
<STRUCTURE_CAT>101</STRUCTURE_CAT>
<C_YES>Yes</C_YES>
<C_NO>No</C_NO>
<C_CATEGORY_SET_ID>1</C_CATEGORY_SET_ID>
<BUSINESS_GROUP_ID>0</BUSINESS_GROUP_ID>
- <LIST_G_HEADERS>
- <G_HEADERS>
<POH_REMARKS />
<CREATION_DATE>01-SEP-10</CREATION_DATE>
<STATUS>Approved</STATUS>
<REV>0</REV>
<PRINTED_DATE />
<TYPE>Standard Purchase Order</TYPE>
<BUYER>BUNTING, DOUGLAS</BUYER>
<C_CURRENCY>USD</C_CURRENCY>
<VENDOR>Softchoice Corporation</VENDOR>
<ACCEPTANCE_DATE />
<ON_HOLD />
<VENDOR_SITE>SOFTCHOICE - PO</VENDOR_SITE>
<ACCEPTANCE_REQUIRED>No</ACCEPTANCE_REQUIRED>
<C_AMOUNT_AGR>2500</C_AMOUNT_AGR>
<PO_HEADER_ID1>2790</PO_HEADER_ID1>
<REVISED_DATE />
<PO_NUMBER>30367</PO_NUMBER>
<C_FND_PRECISION>2</C_FND_PRECISION>
- <LIST_G_BREAK_LINES>
- <G_BREAK_LINES>
<LINE>1</LINE>
<LINE_TYPE>GOODS</LINE_TYPE>
<REV1 />
<ITEM_DESCRIPTION>Test</ITEM_DESCRIPTION>
<UNIT>EACH</UNIT>
<PO_HEADER_ID>2790</PO_HEADER_ID>
<UNIT_PRICE>500</UNIT_PRICE>
- <LIST_G_SHIPMENTS>
- <G_SHIPMENTS>
<CLOSED_CODE />
<LINE_CLOSED>N</LINE_CLOSED>
<LINE_CANCEL>N</LINE_CANCEL>
<NOTE_TO_VENDOR />
<NEED_BY_DATE />
<PROMISED_DATE />
<SHIP_TO_LOCATION>CELL THERAPEUTICS INC</SHIP_TO_LOCATION>
<QUANTITY_AMOUNT_ORDERED>1</QUANTITY_AMOUNT_ORDERED>
<QUANTITY_AMOUNT_RECEIVED>0</QUANTITY_AMOUNT_RECEIVED>
<QUANTITY_AMOUNT_CANCELLED>0</QUANTITY_AMOUNT_CANCELLED>
<QUANTITY_AMOUNT_DUE>1</QUANTITY_AMOUNT_DUE>
<QUANTITY_AMOUNT_BILLED>0</QUANTITY_AMOUNT_BILLED>
<C_FLEX_CAT>COMPUTER SUPPLIES</C_FLEX_CAT>
<C_FLEX_ITEM />
</G_SHIPMENTS>
</LIST_G_SHIPMENTS>
- <LIST_G_CONCAT_SEGMENTS>
- <G_CONCAT_SEGMENTS>
<DELIVER_TO_PERSON_NAME>DOUGLAS BUNTING</DELIVER_TO_PERSON_NAME>
<PO_HEADER_ID2>2790</PO_HEADER_ID2>
<CONCAT_SEGMENTS>01.000.000.15020.00000.00</CONCAT_SEGMENTS>
<PLL_LOCATION_ID>3053</PLL_LOCATION_ID>
</G_CONCAT_SEGMENTS>
- <G_CONCAT_SEGMENTS>
<DELIVER_TO_PERSON_NAME>DOUGLAS BUNTING</DELIVER_TO_PERSON_NAME>
<PO_HEADER_ID2>2790</PO_HEADER_ID2>
<CONCAT_SEGMENTS>01.000.105.65020.00000.00</CONCAT_SEGMENTS>
<PLL_LOCATION_ID>3052</PLL_LOCATION_ID>
</G_CONCAT_SEGMENTS>
</LIST_G_CONCAT_SEGMENTS>
<C_FLEX_CAT_DISP>COMPUTER.SUPPLIES.</C_FLEX_CAT_DISP>
<C_FLEX_ITEM_DISP />
</G_BREAK_LINES>
- <G_BREAK_LINES>
<LINE>2</LINE>
<LINE_TYPE>GOODS</LINE_TYPE>
<REV1 />
<ITEM_DESCRIPTION>test</ITEM_DESCRIPTION>
<UNIT>EACH</UNIT>
<PO_HEADER_ID>2790</PO_HEADER_ID>
<UNIT_PRICE>1000</UNIT_PRICE>
- <LIST_G_SHIPMENTS>
- <G_SHIPMENTS>
<CLOSED_CODE />
<LINE_CLOSED>N</LINE_CLOSED>
<LINE_CANCEL>N</LINE_CANCEL>
<NOTE_TO_VENDOR />
<NEED_BY_DATE />
<PROMISED_DATE />
<SHIP_TO_LOCATION>CELL THERAPEUTICS INC</SHIP_TO_LOCATION>
<QUANTITY_AMOUNT_ORDERED>2</QUANTITY_AMOUNT_ORDERED>
<QUANTITY_AMOUNT_RECEIVED>0</QUANTITY_AMOUNT_RECEIVED>
<QUANTITY_AMOUNT_CANCELLED>0</QUANTITY_AMOUNT_CANCELLED>
<QUANTITY_AMOUNT_DUE>2</QUANTITY_AMOUNT_DUE>
<QUANTITY_AMOUNT_BILLED>0</QUANTITY_AMOUNT_BILLED>
<C_FLEX_CAT>COMPUTER SUPPLIES</C_FLEX_CAT>
<C_FLEX_ITEM />
</G_SHIPMENTS>
</LIST_G_SHIPMENTS>
- <LIST_G_CONCAT_SEGMENTS>
- <G_CONCAT_SEGMENTS>
<DELIVER_TO_PERSON_NAME>DOUGLAS BUNTING</DELIVER_TO_PERSON_NAME>
<PO_HEADER_ID2>2790</PO_HEADER_ID2>
<CONCAT_SEGMENTS>01.000.000.15020.00000.00</CONCAT_SEGMENTS>
<PLL_LOCATION_ID>3053</PLL_LOCATION_ID>
</G_CONCAT_SEGMENTS>
- <G_CONCAT_SEGMENTS>
<DELIVER_TO_PERSON_NAME>DOUGLAS BUNTING</DELIVER_TO_PERSON_NAME>
<PO_HEADER_ID2>2790</PO_HEADER_ID2>
<CONCAT_SEGMENTS>01.000.105.65020.00000.00</CONCAT_SEGMENTS>
<PLL_LOCATION_ID>3052</PLL_LOCATION_ID>
</G_CONCAT_SEGMENTS>
</LIST_G_CONCAT_SEGMENTS>
<C_FLEX_CAT_DISP>COMPUTER.SUPPLIES.</C_FLEX_CAT_DISP>
<C_FLEX_ITEM_DISP />
</G_BREAK_LINES>
</LIST_G_BREAK_LINES>
<C_AMOUNT_AGR_ROUND>2500</C_AMOUNT_AGR_ROUND>
<C_AMOUNT_AGR_DISP>2,500.00</C_AMOUNT_AGR_DISP>
</G_HEADERS>
</LIST_G_HEADERS>
</G_COMPANY>
</LIST_G_COMPANY>
<XCOMPANY_NAME>CTI US Ledger</XCOMPANY_NAME>
<YES>Yes</YES>
<NO>No</NO>
<ORG_ID>83</ORG_ID>
<CAT_ID>1</CAT_ID>
<COUNT_RECORDS>1</COUNT_RECORDS>
</XXCTI_POXPOSTD_1>
**Here is the Query for the RDF file...**
SELECT pol.line_num Line
, pol.closed_flag Line_Closed
, pol.cancel_flag Line_Cancel
, pol.closed_code
, plt.line_type Line_Type
, &P_FLEX_CAT C_FLEX_CAT
, &P_FLEX_ITEM C_FLEX_ITEM
, pol.item_revision Rev
, pol.item_description Item_Description
, pol.unit_meas_lookup_code Unit
, pol.note_to_vendor Note_to_Vendor
/* Bug: 141118 Take unit price from PO_LINES if there is no shipment */
, to_number(decode(plt.order_type_lookup_code,
'AMOUNT',null,
nvl(pll.price_override,pol.unit_price))) Unit_Price
, hrl.location_code Ship_To_Location
, pll.promised_date Promised_Date
, pll.need_by_date Need_By_Date
, ROUND (DECODE (PLT.order_type_lookup_code, /* <SERVICES FPJ> */
'RATE', NVL(PLL.amount, POL.amount),
'FIXED PRICE', NVL(PLL.amount, POL.amount),
NVL(PLL.quantity, POL.quantity)), :p_qty_precision) Quantity_Amount_Ordered
, ROUND (DECODE (PLT.order_type_lookup_code, /* <SERVICES FPJ> */
'RATE', NVL(PLL.amount_received, 0),
'FIXED PRICE', NVL(PLL.amount_received, 0),
NVL(PLL.quantity_received, 0)), :p_qty_precision) Quantity_Amount_Received
, ROUND (DECODE (PLT.order_type_lookup_code, /* <SERVICES FPJ> */
'RATE', NVL(PLL.amount_cancelled, 0),
'FIXED PRICE', NVL(PLL.amount_cancelled, 0),
NVL(PLL.quantity_cancelled, 0)), :p_qty_precision) Quantity_Amount_Cancelled
, ROUND (DECODE (PLT.order_type_lookup_code, /* <SERVICES FPJ> */
'RATE', NVL(PLL.amount, POL.amount) - NVL(PLL.amount_cancelled, 0)
- NVL(PLL.amount_received, 0),
'FIXED PRICE', NVL(PLL.amount, POL.amount) - NVL(PLL.amount_cancelled, 0)
- NVL(PLL.amount_received, 0),
NVL (PLL.quantity, POL.quantity) - NVL(PLL.quantity_cancelled, 0) - NVL(PLL.quantity_received, 0)),
:p_qty_precision) Quantity_Amount_Due
, ROUND (DECODE (PLT.order_type_lookup_code, /* <SERVICES FPJ> */
'RATE', NVL(PLL.amount_billed, 0),
'FIXED PRICE', NVL(PLL.amount_billed, 0),
NVL(PLL.quantity_billed, 0)), :p_qty_precision) Quantity_Amount_Billed
, pol.po_header_id
FROM po_line_locations pll
, mtl_system_items msi
, mtl_categories mca
, po_lines pol
, po_line_types plt
, hr_locations hrl
WHERE
ROUND (DECODE (PLT.order_type_lookup_code,'RATE', NVL(PLL.amount, POL.amount) - NVL(PLL.amount_cancelled, 0) - NVL(PLL.amount_received, 0),'FIXED PRICE', NVL(PLL.amount, POL.amount) - NVL(PLL.amount_cancelled, 0) - NVL(PLL.amount_received, 0),NVL (PLL.quantity, POL.quantity) - NVL(PLL.quantity_cancelled, 0) - NVL(PLL.quantity_received, 0)), :p_qty_precision) > 0
AND (ROUND (DECODE (PLT.order_type_lookup_code,'RATE', NVL(PLL.amount, POL.amount),'FIXED PRICE', NVL(PLL.amount, POL.amount), NVL(PLL.quantity, POL.quantity)),:p_qty_precision)) > (ROUND (DECODE (PLT.order_type_lookup_code,'RATE', NVL(PLL.amount_billed, 0),'FIXED PRICE', NVL(PLL.amount_billed, 0),NVL(PLL.quantity_billed, 0)), :p_qty_precision))
AND pol.item_id = msi.inventory_item_id(+)
AND nvl(msi.organization_id,:c_organization_id) = :c_organization_id
AND pol.line_type_id = plt.line_type_id
AND pol.category_id = mca.category_id
/* Bug No 141118
Added the outer join on po_line_id ,hrl.location_id and nvl on the shipment_type
Also added nvl on quantity and price so as to select quantity and price if the PO
has no shipments */
AND pol.po_line_id = pll.po_line_id(+)
AND pll.ship_to_location_id = hrl.location_id(+)
AND pll.shipment_type in ('STANDARD', 'PLANNED')
AND &P_WHERE_CAT
AND &P_WHERE_ITEM
ORDER BY pol.line_num> I made a pr with single line item with 3 account assignment on percentage basis.I created a PO against .GR non valuated was automatically ticked so no account assignment was created at the time of GR posting.
When you are having the multiple account assignment, then the system will force you to have GR-non valuated indicator being flagged which results in the fact there is not any FI document at GR posting stage and this is the standard feature of SAP.
> Can I make a valuted GR against PO line item with multiple account assignment.
No, not at all. The disability of GR indicator can be set in OME9 with account assignment category
> I faced another problem .I displayed the GR and after ticking out put check box in the general data page of the GR doc. the output is being saved but the update is terminated immediately.and no output page is generated in this item level.This output problem is not there at the time of single account assignment at PO line item.
In fact, it is possible to maintain multiple account assignment for each and every PO line item by selecting the 'Multiple Account Assignment' button in the 'Account Assignment' View of the Item Detail of PO. However, for such multiple account assignment selection, no accounting document will be generated upon GR maintenance. This can only be done during IR via LIV process. -
Restriction on number of invoices to be paid through APP for each vendor
Hi,
We configured APP and print cheques through APP.
The output contains invoice wise details ( Payment advice) and the cheque.
In case the Number of invoices are more than 10 for a single vendor, it is printing one cheque -- This is OK.
But the problem is with the Payment advice. The details of the invoices could not be accommodated in the place meant for the Payment advice.
What i am looking at :
Can we restrict the numbe of invoices which can be paid thorugh APP to 10 only for a single vendor ?
Example : A vendor has say 13 invoices, iWhen i execute APP , it should create one payment document for 10 invoices and another payment document for 3 invoices. Is this possible ? if so how ?
Thanks
SivaHi,
I think you can use the variant of the tab printout/data medium to restrict the number of the line in payment advice note.
Check in 'output control' the 'no.of items in payments summary' eq 10.
I don´t know if it´s require to config the FBZP -> Pmnt.methods in company code ->Pyt adv.ctrl -> restrited to XXX and Pymt adv. after... lines.
Best regards,
H.Marques
Maybe you are looking for
-
cancel purchase. How to? ID: [email protected] Ordrenummer #AD005459635DK Adobe Photoshop Elements 13 (Windows,Engelsk)
-
Movie rental download is taking to long.
Im trying to rent a movie. It says I still have 7 hours left for it to download. But, as it downloads it asked if I would like to watch the movie now or later. When I pressed now the screen changed and the movie did not play at all. It starts to play
-
How to create a boot disc from Lion pre installed into my Macbook Pro 2011 ?
Hi guys, I want to know how to create a boot disc from Lion pre installed into my New Macbook Pro ? I want to re-install the Lion from zero. When I bougth it I´ve used the Migrant assitance and now I want to re-install the Lion. How can I do it ? tha
-
I'm trying to import saved messages from another mac (Mail). Mail imports the folder, and the mailboxes, but then no actual emails show up in Mail. Even if I go back and manually drag the individual emails to the mailbox>messages folder in Library>Ma
-
Where can I find a list of acceptable products that could have been used to apply to a Creative Suites Design Standard 4 Upsell?