Using DMR for multiple GR line item
Hi,
I would like to ask for some clarification in using DMR.
For example is I have multiple line item for a GR with separate Inspection Lot Number. How will it be handled during DMR?
A scenario is for a example, I have 10 lot. First 9 lot skipped then 10th lot inspected, then if fail do normal inspection for the next 5 lot.
How will the system behave if GR is done at the same time for the 10 line item.
Thank you,
Raymond
Dear Raymond
Also there is another dimension to this. There are two type of timing fo Dynamic modification rule
1) Dynamic Modification at Lot Creation
For dynamic modification at lot creation, the quality level is updated when an inspection lot is created. The system assumes that the forthcoming inspection will lead to an acceptance of the inspection lot or characteristic.
An inspection lot, which is created immediately after the quality level is updated, uses the information in the updated quality level without a usage decision having been made.
If dynamic modification is carried out at lot creation and the inspection lot is subsequently rejected, the system updates the quality level again when the usage decision is made. The new inspection stage is used by the system to calculate the sample sizes for the next inspection lot.Changing the quality level does not affect inspection lots that were created in the meantime.
2) Dynamic Modification with the Usage Decision
For dynamic modification with the usage decision, the system updates the quality level when you make the usage decision. At this point, the system evaluates the conditions for an inspection stage change based on the dynamic modification rule and, depending on the results of the current inspection, it determines whether or not the inspection stage should occur.
Regards
Gajesh
Similar Messages
-
Percentage wise Confirmation for Multiple Service line items
Hi,
Percentage wise Confirmation for Multiple Service line items
During doing service entry sheet am able to do % wise confirmaion from
Menu -> Entry Sheet -> Create -> With Planned Service -> Enter Percent.
But this works only for single line item the first line.
If we have multiple line items & if i give 10%, It calculates 10% for
all items.
We want Line wise % confirmation can be given as % confirmation will differ from
line to line.
Thanks
ShashankDear ,
This percentage is a header data i.e applicable for all service items
F1 help clearly says
Percentage quantity to be adopted
Use
If you wish to adopt the planned services from the purchase order, you
can enter an additional percentage in this field in order to have that
percentage adopted instead of the total quantity shown in the purchase
order.
Example:
Quantity specified.............Quantity to be adopted:.............Quantity specified "
in purchase order:....................... 10 %..................................entry sheet:
Service 1.......100 pc ................................................................10 pc
Service 2.......200 m ............................................................... 20 m
Service 3. .....30 h ................................................................. 3 h
Edited by: redriver on Jan 22, 2012 6:50 AM -
BAPI_PO_CREATE1 for Multiple service line items
Hi Exports,
I am using BAPI_PO_CREATE1 to create service PO. I am facing problem when each line item(ebelp) has multiple service line items. I am unable to map multiple service line items to a single line item (ebelp) properly.
Can anyone help.
Regards,
KiranHi ,
I am able to create service PO when only one service line item is there.
If multiple service line items are there. then i have to put the below code with in the loop.
here i am facing the probelm.
w_poservices-pckg_no = g_pckg.
w_poservices-line_no = g_pckg.
w_poservices-outl_ind = c_x.
w_poservices-subpckg_no = g_pckg + 1.
w_poservices-service = w_sdata-srvpos.
w_poservices-short_text = w_idata-ktext1.
w_poservices-quantity = w_idata-menge.
w_poservices-base_uom = w_idata-meins.
w_poservices-gr_price = w_idata-tbtwr.
w_poservices-matl_group = w_idata-matkl.
APPEND w_poservices TO i_poservices.
CLEAR: w_poservices.
w_poservices-pckg_no = g_pckg + 1.
w_poservices-line_no = g_pckg + 1.
w_poservices-ext_line = 0000000010.
w_poservices-outl_ind = c_x.
w_poservices-subpckg_no = g_pckg + 2.
w_poservices-service = w_sdata-srvpos.
w_poservices-short_text = w_sdata-ktext1.
w_poservices-quantity = w_sdata-menge.
w_poservices-base_uom = w_sdata-meins.
w_poservices-gr_price = w_sdata-tbtwr.
w_poservices-matl_group = w_idata-matkl.
APPEND w_poservices TO i_poservices.
CLEAR: w_poservices.
w_posrvaccessvalues-pckg_no = g_pckg + 1.
w_posrvaccessvalues-line_no = g_pckg + 1.
w_posrvaccessvalues-serno_line = 01.
w_posrvaccessvalues-serial_no = 01.
w_posrvaccessvalues-quantity = w_idata-menge.
APPEND w_posrvaccessvalues TO i_posrvaccessvalues.
thank you.
Regards,
Kiran -
Creating a PO Using BAPI For Multiple PLants Or Multiple Line Items
Hi All
Can you please suggest me how to create a Purchase Order Using BAPI_PO_Create1 for Multiple Plants Or for Multiple Line items. The Requirement is like the PO is for single material for single vendor but for mulple stores i.e plants
NOte: Suggest me the Creation of PO for MUltiple Line items or for multiple plants Using BAPI . Hope you people will give me the needful.
Regards
Shivakumar BandariHi,
Here is the sample code to do that...
*---> po header data
wa_poheader-vendor = your vendor..
wa_poheader-doc_type = Your doc type..check with Functional contact....
wa_poheader-purch_org = Purchasing Org..
wa_poheader-pur_group = Purchasing Group
*---> po header data (change toolbar)
wa_poheaderx-vendor = 'X'.
wa_poheaderx-doc_type = 'X'.
wa_poheaderx-purch_org = 'X'.
wa_poheaderx-pur_group = 'X'.
*---> poitem data
data: item like ekpo-ebelp.
item = '0010'.
loop at t_parts.
it_poitem-po_item = '00010'.
IT_POITEM-PLANT = Plant..
IT_POITEM-STGE_LOC = Sloc...
*---> poitemx (item data change toolbar)
it_poitemx-po_item = '0010'.
it_poitemx-po_itemx = 'X'.
IT_POITEMX-PLANT = 'X'.
IT_POITEMX-STGE_LOC = 'X'.
*---> add record's to internal table
APPEND: it_poitem,
it_poitemx.
endloop.
*call bapi_po_create1
CLEAR v_ebeln.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_poheader
poheaderx = wa_poheaderx
IMPORTING
exppurchaseorder = v_ebeln
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx.
*---> check the return table for error message
READ TABLE it_return WITH KEY type = 'E'.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
endif.
Thanks,
Murali -
Cheque print out for vendor multiple open line items
HI experts,
I want to print a cheque using f-58 for vendor payment.The problem is when i click the vendor open items(vendor invoice) for a single line item its getting displayed.But when i click for vendor multiple open items(invoices) its not getting displayed in the script out put.Its displaying only with single document number(posting).thank you..its solved
-
Multiple delivery schedule (with same delivery date) for same PO line item
Hi All,
In a STO, for a PO line item say for 10 quantities. I have been receiving 3 delivery schedule with the same day with quantities say 5 3 2. I would like to know the what would be possible reasons for this.
Regards,
PSSHi PSS,
I had the similar issue there is a report which gives you the reason for delivery split
Please refer to the following thread
Multiple deliveries created
Thanks
Diwakar -
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 -
Auto project triggering when multiple FG line item's in sales order
Dear Friends,
I am working on engineering project scenario mainly all are the Customer projects.
Basically my client executes Customer projects for Establishing Dairy Plant, Pharma Plant, and Chemical Plant. For that they manufacture various FG assemblies & delivers to Customer site & accordingly Billing will be done to Customer.
Here my area of concern is for any single customer project for Ex. u201CSetting up Dairy Plantu201D requires multiple FG assemblies. For example in this case 20 FG assemblies to be manufactured & delivered to customer & accordingly billing will be done.
By using strategy group u201C21u201D Make-to-order prod. / Project settlement Can is it possible to trigger the project at sales order level with multiple FG assemblies as a multiple line items in sales order. For example, 20 FG assemblies.
If it is possible then what are the prerequisite configurations needs to be done from PS, SD & MM module.
I think strategy group u201C85u201D Assembly processing with network/project will not be applicable in above scenario. This strategy group is applicable for single FG line item in Sales Order not for multiple line items.
Kindly guide me how to overcome from above scenario.
Thanks & Regards,
PrasadHi Ahmed,
Thanks for quick response....
Can you explore about strategy u201C21u201D Make-to-order prod. / Project settlement.
By using strategy group u201C21u201D Make-to-order prod. / Project settlement Can is it possible to trigger the project at sales order level with multiple FG assemblies as a multiple line items in sales order. For example, 20 FG assemblies.
If it is possible then what are the prerequisite configurations needs to be done from PS, SD & MM module
Thanks & Regards,
Sandeep -
Service PO with Multiple service Line Items
Hi,
i am working on Service Po Creation by using BAPI BAPI_PO_CREAT1. I am able to create service for multiple line items but the problem is single line item my have multiple service line items in that case my object is not working. Can any one suggest solution for this.Here i am attachng what i written logic
T_POITEM-PCKG_NO = V_PACKNO.
T_POSERVICE-PCKG_NO = V_PACKNO. "'0000000001'.
T_POSERVICE-LINE_NO = V_LINENO. "'0000000001'.
T_POSERVICE-OUTL_IND = 'X'.
T_POSERVICE-EXT_LINE = '0'. "V_EXTLIN. "'0'.
T_POSERVICE-OUTL_LEVEL = '0'. "V_EXTOUT. "'0'.
T_POSERVICE-SUBPCKG_NO = V_PACKNO + 1. "'0000000003'. "(Dummy No.)
T_POSERVICE-QUANTITY = ITAB-SERV_QUANTITY.
T_POSERVICE-BASE_UOM = ITAB-BASE_UOM.
T_POSERVICE-PRICE_UNIT = '1'.
T_POSERVICE-GR_PRICE = ITAB-GR_PRICE.
T_POSERVICE-SHORT_TEXT = ITAB-SERV_TEXT. "'SERVICE TEST'.
APPEND T_POSERVICE.
V_LINENO = V_LINENO + 1.
* V_PACKNO = V_SUBPACKNO.
T_POSERVICE-PCKG_NO = V_PACKNO + 1.
T_POSERVICE-LINE_NO = V_LINENO.
T_POSERVICE-EXT_LINE = V_EXTLIN + 10. "'0'.
T_POSERVICE-OUTL_LEVEL = '0'. "V_EXTOUT. "'0'.
T_POSERVICE-OUTL_IND = SPACE.
T_POSERVICE-QUANTITY = ITAB-SERV_QUANTITY.
T_POSERVICE-SUBPCKG_NO = '0000000000'.
T_POSERVICE-BASE_UOM = ITAB-BASE_UOM.
T_POSERVICE-PRICE_UNIT = '1'.
T_POSERVICE-GR_PRICE = ITAB-GR_PRICE.
T_POSERVICE-SHORT_TEXT = ITAB-SERV_TEXT. "'SERVICE 1'.
T_POSERVICE-PLN_PCKG = V_PACKNO + 1.
T_POSERVICE-PLN_LINE = V_LINENO.
* T_POSERVICE-MATL_GROUP = '0082'.
APPEND T_POSERVICE.
* SET PCKG_NO AS SUB_PCKG_NO IN TABLE POSRVACCESSVALUES THIS:
T_POSERVALUE-PCKG_NO = V_PACKNO + 1. "'0000000003'.
T_POSERVALUE-LINE_NO = V_LINENO.
T_POSERVALUE-SERNO_LINE = '01'. "'01'.
T_POSERVALUE-SERIAL_NO = '01'. " '01'.
T_POSERVALUE-QUANTITY = ITAB-SERV_QUANTITY. "'10.000'.
APPEND T_POSERVALUE.by following instructions in 420332 note.
-
RFFOAVIS_FPAYM: Is this print program will support multiple PO line items
Hi, I am using the print program:<b>RFFOAVIS_FPAYM</b> and customized layout of: <b>F110_IN_AVIS</b>. I am able to get multiple Document numbers but I am not getting the multiple PO line items for each Document no. I had called the perform statement in text element : <b>625</b> in Main window.
Can you suggest how to modify the standard print program to our requirement. Where we need to
[code][code][code]<b>declare the text element</b>
[/code][/code][/code], Where we will declare the <u><b>internal table for getting the PO line items.</b></u>
Thanks & Regards
MadhuAmar,
You can create a PO with multiple line item, but you can not create the PO with multiple currency.
Regards,
Manish -
Table for tax code line item after miro
Can anybody tell table for tax code line item (other than BSET) after MIRO.
RajHi,
First let me explain you the logic in this repot.
If a document have more than one GL accounts relevant for tax and having the same tax code. So there is only one tax line for that tax code in BSET.
Now in the standard reports like S_ALR_87012357, output has the tax base amount etc, based on tax line from BSET which is a single line the above document. However this single line contains multiple tax relevant account and thus SAP can not show all the G/L account for this single line in the report S_ALR_87012357. So SAP picks up the first account in the output.
The declaration in this report is not wrong, as the total gets calculated based on the tax code and which is correct and meets the tax reporting requirement.
If you want to see the G/L account wise output, you can use the program RFUMSV10. Refer OSS note 1175418 "RFUMSV00: G/L account display" for details.
https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1175418
In your report, you can use this program logic for reference.
Regards,
Gaurav -
Function Module for FB01 Vendor line items postings in 3.1 Version
Hello all,
Is there any Function Module for FB01 Vendor line items postings in 3.1 Version. I do not want to go for BDC. Please suggest.
Thanks,
SubbaHi,
search for function module ACCPOSTING* or get development class of transaction FB01 and goto SE80, enter development class - and search in function group's function module.
Cheers.
...Reward if useful. -
Selection of data from RSEG for various PO line items
Hi ,
We have a requirement to calculate the total goods receipt value and break up cost for transportation also. In purchase order there are various conditions (base price, transportation,surcharge). I am trying to get all the goods movement for a PO line item and total goods receipts. Similarly all the documents from RSEG(we are using split invoice) for that PO line item, so for each PO line item RSEG has entries as many as conditions (i am trying to get all the conditions for PO line item from KONV table) . If the total goods receipts and invoiced amounts are different, i need to calculate the expected value based on conditions on PO for the remaining quantity.
The problem is each condition in PO line item has one RSEG entry, but in the field KSCHL(condition type) does not have any value for base price, but it has for other conditions.
is there any specific reason for not updating that for base price.
Thanks in advanceHi,
The 'Free Items' indicator in the overview is only used to facilitate
the switching off of the Inv.Receipt flag and the GR-based IV flag.
Note that the 'Free Items' indicator is not stored on the PO item
table EKPO.
The Inv.Receipt flag (and the GR-based IV flag) are the fields that
really controls if an item is 'free' or not.
So, the field is initiated based on the values in those fields rather
than from input from the user.
When an invoice is expected it's not a free-item. This indicator
invoice receipt is chosen from the main-item and also from the
customization maintained for item category 0 in table T163.
I am afraid that I have to say that in standard SAP design
it is not possible to default the "Free item" flag.
Regards,
Edit -
Use Tax for Free of charge items
Here is the scenario:
In our Business, there is a process to give a Free item with mostly all the products sold online. In SAP, we will create regular sales order with 1 line item as TAN and other item category as TANN.
The Business wants to calculate Use tax on the 2nd line item where Net value=0. As we use the same Pricing procedure, we cannot charge different taxes based on line item.
The other option was to send the cost details to Vertex, so that they can store it in Vertex and use for Tax calculations. The technical issue is that whenever the Net value=0, Vertex RFC is not called.
We have proposed to create a report in SAP which will tell them the order details with Free items but this is not acceptable to Business.
Has anyone worked on such scenario where Use tax is calculated on the Sales side for Free of charge items.The basic concept in tax is seller can levy the appropriate tax on the items which they are billing. This being the case, I am not sure, why for a free of charge item, tax should be levied. Can you please share in which Business process, this is being followed. Needless to mention, if at all you want to achieve this requirement, have a separate condition type for this free goods, set as statistical, so that, only tax portion would be posted to FI.
G. Lakshmipathi -
Defaulting the Sotrage location for all the line items in my sales order
Hi,
I have a scenario to default the storage location automatically in my sales order for all the line items. It is not going to change for a particular sales org. Dist. channel & Division combination. Can you pls. suggest me a solution for this.
Thanks
Ghanesh.Hi,
You can default the storage location by using the below user exit
Storage location
Auto determination of storage location as u2018XXXXu2019 for sales order
Include - MV45AFZB
Form - USEREXIT_SOURCE_DETERMINATION
IF (VBAK-AUART = 'XXXX' and VBAK-VKORG = 'XXXX' and VBAK-VTWEG = 'XX').
VBAP-LGORT = 'ABCD'.
Regards,
Gopal.
Edited by: Gopalakrishnan S on Feb 25, 2010 7:35 AM
Maybe you are looking for
-
Need Help-SOA 11g File Adapter unable to delete input file and its crashing
Hi All Please find the details below: 1. We have created a simple SOA composite to Read file from an input directory, archive the file in an archive directory using Inbound File Adapter Read and then use Outbound File Adapter Write to move the file t
-
Enterprise manager is not able to connect to database instance
Hi I am having a problem with Oracle EM. I would appreciate very much if anyone can help me. I installed Oracle on XP which runs on virtual pc on XP as well. Everything is fine, I can connect to database with sqlplus, and there were no errors during
-
Macbook Aluminum connect to Standard CRT Tv
Hi, I've read some of the postings on here and on other websites. I have an idea of connecting my Aluminum macbook to a CRT TV with the RGB cables because i don't have a fancy plasma tv like everyone else does apparently. I was just wondering, if i b
-
I am having a problem getting my t-list to populate with values from a database table. I have a table that has one column of data that I wish to display in a t-list. The elements in the column will change so I want to populate the t-list dynamically.
-
I can't make hyperlinks in ID CS5. I highlight some text, select new hyperlink in the hyperlink panel, type in a url, cllick ok. The linked text shows up in the panel, but in the document it's still just text. It's not a link. What am I doing wrong?