Requested delivery date is not filled on the header
Hi everyone!
I'm trying to configure the system to automatically calculate delivery date in sales order based on the other date and duration.
I'm working with standalone CRM 7.0 and I've configured date profile for sales order that uses REQ_DLV_DATE date type, my own date type to enter a payment fact date there and duration DLVTIME. I've created a rule that calculates REQ_DLV_DATE=YPAYMFACT+DLVTIME. But when I enter Payment Fact date and delivery time, delivery date is calculated in Dates assignment block but it's not getting updated on the header ([screenshot|http://www.picdrop.net/images/requesteddeliverydat.png]). How can I achieve this?
Please, help.
Regards,
Alex.
Thanks for your answer Robert.
In crmv_event I've found
Trans. Category - BUS2000115
Execution Time - 1 Immediately
Priority - 1
Object Name - APPOINTMENT
Event - AFTER_CHANGE
Attribute - REQ_DLV_DATE
Function - CRM_LATEST_DELIVERY_DATE_CH_EC
Header - Checked
Item - Checked
I've tried to debug CRM_LATEST_DELIVERY_DATE_CH_EC func. module but it doesn't break in that module. Does it mean that the event is not getting handled?
Similar Messages
-
Schedule lines are not modified when i change the requested delivery date
Hi
i have a issue when i am created sales order with requested delivery date 10.11.2011
and the same is copied in to item schedule lines as a 10.11.2011
before saving the order i change the requested derlivery date to 11.11.2011
this new requested delivery date is not dopied to schedule lines at item level (still is having 10.11.2011)
can any one tell me this is system standard behaviour or can we correct this
Thanks and Regards
KishoreHi DevarapalliKK,
I tried this solution & problem is solved.
--Go to VA01 & enter the material & qty
--Select the line item in VA01 & click on Edit
--Select Fast Change of & click on Delivery date & mention the Delivery date as 11.11.2011. & click on copy.
--Check the request delivery date in header level in sales tab it will change to 11.11.2011 & also check the Schedule lines in Item level the date will be 11.11.2011 & Save it.
Please let me know if your problem is solved
Regards
Pradeep -
Unable to change requested delivery date in the sales order at item level.
The issue is when I create order with one material (linked to network and project is created automatically in the background), I am able to change (in change mode) req delivery date for an item, but when I create order with 2 materials (linked to network and project is created automatically in the background), I can not change (in change mode) the req delivery date of any item. Req delivery date is then copied from the header req delivery date.
Is this a standard SAP functionality or a defect?Req del date is the date requested by customer and can be changed at item level. Probably the confirmed date in the schedule line is derived from the network scheduling after ATP check. (ATP check is not activated in this case)
I am able to change the req del date at item level if there is only one item (Linked to network) and not when there are two line items (Both are linked to 2 diff networks belonging to same project)
I tried to change the date in the network, scheduled and saved but that didnt change the date in the sales order. On the contrary, if I run ATP check, netowrk dates get back to original dates derived from sales order. -
Different Request Delivery Date & Goods Issue Date
Hi SD Experts,
Please find my queries as below:
1. How do i configure the system to propose delivery date as today's date? Currently the system now always propose tomorrow's date but i want it to be today's date. Assuming today is 21st December but the system is always giving 22nd December. Anything that can be done inside SPRO? Inside VOV8 i just tick 'Propose Delivery Date' but i left the box empty for 'Lead time in days'
2. Assuming today is 21st December, and i created a SO. The goods issue date is always tomorrow's date as well which is 22nd December. I want the goods issue date to follow 'Request Delivery Date'
3. In conclusion, why is 'Request Delivery Date' is always tomorrow's date?
Anything that can be done? Please help
Thanks!
Regards,
LEE
Edited by: YEOW LENG LEE on Dec 21, 2008 12:10 PMHi lee
A request delivery date comes if you maintain the lead time in days in VOV8 , GR time , In-house production time RLT in days in MMR , based on that the you will get the requested delivery date If you keep the fields blank then you will get the request delivery date as todays date only but if you have assigned factory calendar in shipping point and if you create sales order on Saturday (19/12/2008) then the delivery date will be on Monday i.e., 22/12/2008.
Now if you want the goods issue date as different date then the delivery date should be different ,if you fill any one feild and check then you will get the different goods issue date
Coming finally you are getting a request delivery date as tomorrow's date because of the factory calendar you have assigned to shipping point and to the CMR
Regards
Srinath -
Requested Delivery Date (Warning Message Box)
Hi Guru's
We are currently doing some testing in Sales Order creation and suddenly a dialogue box is appearing when we change the <b>Requested Delivery Date</b> and <b>First Date</b> fields to the current date.
<b>The Message Reads</b> :
Planned delivery dates exist for the customer.
The requested delivery date is not a planned date.
Select a requested delivery date.
11.06.2007 Current Requested Delivery Date
12.06.2007 Next Planned Delivery Date
Please can you advise how it would be possible to switch this message off.
Thanks in advance for your assistance.
Thks
KCHi Nikhil
Thnak you very much for your reply .
You are correct it is the delivery dates set on Master Data under the Additional DSD Data button that influences this message.
Do you perhaps know how to turn this warning message of.
Thanks
KC -
Requested Delivery Date not getting filled in ET_SALES
Hi Experts,
I am trying to read the Requested Delivery Date from FM CRM_ORDER_READ --> ET_SALES before the order is SAVED.
But the ET_SALES --> REQ_DLV_DAT is not getting filled until the Order is saved.
However, ET_SCHEDLIN --> FROM_TIME is getting filled even before the order is saved.
Is this standard functionality or am I missing on something?Hi,
In case you have missed on regular delta then you don't have any other choice than to selectively delete reciord from Infoprovider in case there is only cube..
If DSO in between with overwrite just load the records in DSO and check what is change log for this record.
If you can selectively load you can selectively delete for recent period..load again for that period in set up table then to SAP BW through full repair option.
Thanks and regards -
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 -
Requested delivery date not copied from quote item to order item
CRM 7.0 copying from a quote to an order is ot copying the requested date at the item or header.
For the Header we are using copying routine SLSHDR and for the item SALES
There is a date profile assigned to both the quote & item category, these objects are in the date types.
BILL_DATE Billing Date
INVCR_DATE Billing Document Created On
OPP_DEL_DATE Requested Delivery Date
ORDERACTUAL Actual Dates
REQ_DLV_DATE Rqstd Delivery Date Proposal - Order Hdr
VALIDFROM Valid From
VALIDTO Valid To
This seems like it should not be so complicated, we are looking at a Badi for the copy rules but has been challenging to say the least. It seems like there should be a way to configure (not code) this issue.SAP OSS stated functionality not supported, we pushed it back a couple of times. Even though this is out of the box functionality in ECC copying a quote to an order.
Our developer was able to code a solution in method IF_EX_CRM_COPY_BADI~DATES, our ecommerce app calls this function when the quote is converted to an order in ISA. -
Proposed delivery date should not get copied to the target document
Hi gurus,
I am creating a quotation and it is taking proposed delivery date as creation date and confirming a schedule line. When i create the sales order the same data is coped to the sale order. I have a different delivery date in sales order , but the system dose not allow me to change the date saying that a schedule line already confirmed for this line item.
I have unticked the copy schedule line the copay control of item category from quotation to order. still the same problem...pls helpHi,
If you carefully look at the problem, the root cause is not at the schedule line but at the document header where the delivery date is given.
So if you really dont want the delivery date to be copied, you should do that in a new copying routine and in that routine, you should copy all the details except the delivery date. This means that even if you create with reference, system will ask you for requested delivery date. Now you can give the delivery date of your choice and further scheduling will happen automatically. -
Requested delivery date is by default the next day
Hi Friends,
In all my sales order I want to make requested delivery date to the same day as the order is made. currently it is giving the next day.
For example if I make order on 06/01/2011 then system should give requested delivery date as 06/01/2011.
how can I achieve this.
Regards,
Wasim.Hi Lakshmi,
The tick for propose delivery date is there for all the document type. This problem was not there till yesterday, but since today it has started.
It is not happening for ane particular company code. its happening for all 7 company code defined in the system.
What could be the problem and the possible solution.
Regards,
Wasim. -
Hide the "Requested Delivery Date" ERP E-commerce
Hi,
We are implementing the SAP ERP E-commerce with ECC 6.0 as backend.
We donot want to display the feild "Requested Delivery Date" while creating an order both at header and item level in the b2b application.
Please let me know what should be done to disable this.
Thanks and Regards,
RamYou can simply comment the code that displays (and input) the RDD field out from the relevant JSPs. This assumes that te RDD is NOT a required field in your backend order scenario.
If RDD is a requred field, hide them from the items but make the header field a hidden value and give some default value - say today() to the field. Care should be taken to take care of the date type based on the country, sold-to etc.
Easwar Ram
http://www.parxlns.com -
Requested delivery date of the document
Dear Team,
Can you please clarify the role of requested delivery date on the sales order header. It does not look as though the system takes this date into account on delivery creation. Is there a way to make this relevant so deliveries cannot be created until the requested delivery date arrives?
. I was attempting to see if there was any way to make sure the field is actually used properly - availability check should not allow items to be delivered before the requested delivery date. These orders come in through EDI, so there is no human intervention once they are entered.hello, friend.
there are 2 dates you must consider:
1. confirmed schedule lines are the basis for creating the delivery document, not the requested delivery date. the schedule lines are influenced by the schedule line category which, in turn, is influenced by item category and MRP type. of course, availability check also plays a role in the confirmation of schedule lines.
2. the requested delivery date (RDD) is the basis for the system to determine if requirements (i.e. sales order quantities) can be delivered on the RDD.
the sequence/logic in sales order processing will be something like this:
Step 1. you create the sales order, enter material and quantity. RDD is either proposed by the order type or is manually entered.
Step 2. the system then conducts an availability check (unless no availability check was configured).
Step 3. during the availability check, the system determines if the order quantity can be available by the RDD.
a. if yes, the schedule lines are confirmed to be equal to the RDD.
b. if no, then the system proposes a later date when the stocks will be available (assuming RLT); then the schedule lines are also confirmed for a later date.
Step 4. once schedule lines are confirmed, you create a delivery document with the delivery date not earlier than the confirmed schedule line date.
hope this helped.
regards. -
The delivery date should not flow from PR to PO.
Dear Gurus,
While creating a P.O with reference to PR.
The delivery date should not flow from PR to PO.
Any settings are there for thisthere is no planning.
this is a utilites industry.
if there is any way to do.The delivery date should not flow from PR to PO.
please share ur ideas -
Material availability date can not be after the delivery date
Dear Experts,
we are using the following scnario,
1. Once the user creates the sales order, automatically system creates PO in the background.
we have created Bapi program for creation of Background PO in SD User Exit.
The following issue occurs in Prd, DS1, QS1 server, We have done Technical upgradation project, Now when we creates sales order automatically po created with error message of Material availablity date can not be after the delivery date. even sales order no also not updated in the PO.
QAS server (without technical upgrade) i refered the same input parameter and used the same and create the sales order system generates PO automatically without error message.
Does any one can through lights on this issue,
Thanks and Best Regards,
Muralidharan SHi
The dates are determined due to shipping and transportation scheduling settings. So check whether the shipping and transportation scheduling is being performed as per the cofiguration settings after Technical upgrade. Since the MAD date should not be after Delivery date but it seems that the dates are not determined properly.
Also check the Transit time, Loading time, Pick/Pack time and Lead time are retained as same as before the technical upgrade. Use the QAS server settings to validate the settings in other servers.
Regards
Rajkumar K -
Requested delivery date determined by the customers
Experts,
Several customers have theirs own rules for determining requested delivery date. These rules are based on Sales order date.
I mean if the SO is received from monday to wednesday, the requested delivery date should be the next monday.
How can I set up these rules or do I need to consider pures Abap codes...
Thanks !
VictorHi Victor,
Using an ABAPER's help could be an option out.
The other option out would to define different sales documents for each of your days e.g. Sales Document ZMON for monday, ZTUE for tuesday and it the sales document type settings you can keep the lead time as 7 days for ZMON, 6 days for ZTUE so on.
Now if the user creates the sales order with ZMON he will get the delivery date on a monday provided ofcourse he creates the sales order using ZMON on a monday and ZTUE on a Tuesday.
Hope this helps.
J Nagesh
Maybe you are looking for
-
How do i sync new iphone4 with my Macbook?
My Macbook won't recognize my new iphone4 and says "the iphone "iphone" cannot be used because it requires itunes version 10.1 or later. Go to www.itunes.com to download the latest version of itunes." I downloaded itunes 10.3 and went to install it a
-
I have the latest version of iTunes for Windows Vista, and when I download a song, or play a song, the info bar at the top runs a process called "determining song volume". when ever that runs, iTunes stops working, and shuts down. then Vista loads a
-
Loading a sound file from the library to play it in one frame
I am new to actionscript. I have a flash file with several frames. In each frame I need to play a sound file. I've added all the sounds to the library and done all the necessary steps to export for actionscript. Here's my code to play the sound in on
-
my phone 4 some time music player sound coming and volume up and down not show screen .then some time sound coming.. why
-
ASO members with formula not rolling up
Hi Gurus, In our ASO cube we have a members which caluclate % are not rolling up to parent . Its rolling up for MTD but they are not rolling for QTD . Members are in Account dimension .Please let me know if you require more info to get the excat idea