Configuration setting to always put Manual Sales Orders on hold
Can any one tell me the Configuration setting to put Manual Sales Orders always on Hold.
hello, friend.
when you say 'on hold', are you referring to a delivery block and/or a billing block?
if so, you can do this by doing VOV8, select your sales document type and make an entry in the fields 'delivery block' and/or 'billing block'.
now, when you create a sales order using this document type, the order will be automatically blocked and will require release by an authorized party (VKM1, VKM3 and VKM4 for a delivery block, V23 for the billing block).
regards.
Similar Messages
-
How to put sales order on hold
HI sap minds ,
help me how can i put a sales order on hold , through va01 .Add delivery block and/or billing block.
-
Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in Oracle and yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.
Thanks for your advise.
However, I missed to mention that we have two set of users One is for Finished Goods and another for Spares.
Only Spares users need to be prevented from creating Direct/Manual Sales Orders in Oracle.
As you suggested, if this will be done at Form level, that may Disallow FG users also to create Manula Sales Orders which should not be the case.
Further, I tried to test one scenario through Processing Constraints but it did not work.
Application
OM
Validation Type
Entity
Temp
Short Name
TBL
Validation Semantics
Created By
Equal To
User(Myself)
Processing Cosntraint
Application
OM
Entity
Order Header
Constraint
Operation
User Action
Create
Not Allowed
Conditions
Group
Scope
Validation Entity
Record Set
Validation Template
101
Any
Order Header
Order
Above Created
Please advise. -
Setting up Billing Block for SALE ORDER during Invoice cancellation
Hi,
I have a requirement where in i need to set the billing block(VBAK-FAKSK) while saving Invoice cancellation document. Please suggest some user exit or BADI during Invoice save so that i can set the billing block in sale order header data.
Thanks in Advance,
Raghav
Moderator message: please do your own research before asking.
Edited by: Thomas Zloch on Jan 12, 2011 2:59 PMHi,
You can try TCode V.00
This transaction when executed will give you the list of all the sales documents blocked for delivery per sales organization. There are various other criteria which might be useful. This transaction will allow you to edit each sales document.
If this is not the one that you want, then perhaps you might have to develop one.
Thanks
Mukund S -
To get the configuration detials of a material from sales order
Hi Gurus,
I know we can get the configuration details of a material from Purchase order using function module 'ME_VAR_GET_CLASSIFICATION'. I need an equivalent function module for getting configuration details of a material from sales order. Is there any?...
thanks in advance...Hi Gurus,
Myy probelm is solved. I used the same funcitton module ME_VAR_GET_CLASSIFICATION. wiht Material and configuration as the inputs. then i used table CABN to filter the hidden characteristics using the field ACTVE.
This link in SDN will be more useful. please try this.
https://www.sdn.sap.com/irj/scn/wiki?path=/display/profile/2007/09/12/classification+concept&showcomments=true -
Value Set error msg when opening sales order Form
Hi
I created a value Set(where the values are populated at run time based on a view) which is attached to DFF (column eg Attribute13),The Value set would get value populated only if any sales order lines are cancelled, as the value of Attribute13 on cancelled line would be inserted to new Order Line.
The Problem is when ever the Sales order Form is opened it throws the error message
"Value XX For the FlexField Segment dosent not exists in the valueset (Valueset name)" as the oe_order_lines_all.attribute13 has value and the value set has null, it matches it and throw the above error.
Could you guys give any suggestion how to avoid it, or is there any workarould , Thanks
ThanksThis tells me that the same attribute is used for something else and there is a value in that the column that is not your table which you are validating against. Or the value you are setting is not in that table.
About the context: If the same attribute is used under a different context AND if that context gets set when you open the sales order AND if the validation type is different under that context for attribute13, you will get this error.
Thanks
Nagamohan -
hello sdn friends,
how to develop an report to display to open sales orders on hold.
i dont have any idea about this,please help regarding this.Hi,
Check the program
TABLES:vbak,
vbap,
tvko,
tvak,
mara,
tvtw,
kna1,
vbpa.
TYPE-POOLS : slis.
GLOBAL TYPES
naming convention: "TY_name"
TYPES : BEGIN OF ty_vbak ,
vbeln TYPE vbak-vbeln ,
auart TYPE vbak-auart , " DRFK904686
vkorg TYPE vbak-vkorg ,
vtweg TYPE vbak-vtweg ,
vkgrp TYPE vbak-vkgrp ,
bstnk TYPE vbak-bstnk , "DRFK904686(+)
kunrsl TYPE vbak-kunnr ,
END OF ty_vbak .
TYPES: BEGIN OF ty_vbap ,
vbeln TYPE vbap-vbeln ,
posnr TYPE vbap-posnr ,
matnr TYPE vbap-matnr ,
matkl TYPE vbap-matkl ,
kwmeng TYPE vbap-kwmeng,
vrkme TYPE vbap-vrkme , "order unit
zmeng TYPE vbap-zmeng ,
zieme TYPE vbap-zieme , "order unit
netpr TYPE vbap-netpr , "price
netwr TYPE vbap-netwr , "DRFK904686(+)
END OF ty_vbap .
TYPES:BEGIN OF ty_vbuk ,
vbeln TYPE vbuk-vbeln,
Start of addition DRFK904686
lfstk TYPE statv ,
lfgsk TYPE statv ,
fkstk TYPE statv ,
End of addition DRFK904686
END OF ty_vbuk .
TYPES:BEGIN OF ty_vbpa ,
vbeln TYPE vbpa-vbeln,
kunrsh TYPE kunnr ,
END OF ty_vbpa .
TYPES:BEGIN OF ty_makt ,
matnr TYPE matnr,
maktx TYPE maktx,
END OF ty_makt.
TYPES:BEGIN OF ty_t023t,
matkl TYPE matkl,
wgbez TYPE wgbez,
END OF ty_t023t.
TYPES:BEGIN OF ty_kna1 ,
kunnr TYPE kunnr ,
name1 TYPE name1_gp,
END OF ty_kna1.
TYPES:BEGIN OF ty_final ,
vbeln TYPE vbak-vbeln ,
auart TYPE vbak-auart ,
vkorg TYPE vbak-vkorg ,
vtweg TYPE vbak-vtweg ,
vkgrp TYPE vbak-vkgrp ,
bstnk TYPE vbak-bstnk , "PO Number; DRFK904686(+)
kunrsl TYPE vbak-kunnr ,
name1 TYPE name1_gp ,
matnr TYPE vbap-matnr ,
maktx TYPE maktx ,
matkl TYPE vbap-matkl ,
wgbez TYPE wgbez ,
kwmeng TYPE vbap-kwmeng ,
vrkme TYPE vbap-vrkme , "order unit
zmenge TYPE vbap-kwmeng ,
netpr TYPE vbap-netpr , " price "vv
netwr TYPE vbap-netwr ,
zmein TYPE vbap-meins ,
kunrsh TYPE kunnr ,
name2 TYPE name1_gp ,
Start of addition DRFK904686
lfstk TYPE statv ,
lfgsk TYPE statv ,
fkstk TYPE statv ,
End of addition DRFK904686
END OF ty_final .
GLOBAL CONSTANTS
naming convention: "c_name"
CONSTANTS: c_sh TYPE vbpa-parvw VALUE 'WE' ,
c_formname_top_of_page TYPE slis_formname VALUE 'F_DISPLAY_TOP_OF_PAGE',
c_en(2) TYPE c VALUE 'EN' ,
c_a TYPE char1 VALUE 'A' .
GLOBAL ELEMENTARY VARIABLES
naming convention: "w_name"
DATA :w_list_top_of_page TYPE slis_t_listheader,
w_kwmeng TYPE vbap-kwmeng ,
w_meins TYPE t006-msehi ,
w_zmein TYPE t006-msehi ,
w_repid TYPE sy-repid ,
w_zmenge TYPE vbap-kwmeng ,
w_events TYPE slis_t_event ,
w_datum TYPE sy-datum ,
w_umrez1 TYPE marm-umrez ,
w_umren1 TYPE marm-umren ,
w_umrez2 TYPE marm-umrez ,
w_umren2 TYPE marm-umren ,
w_text(25) TYPE c .
GLOBAL STRUCTURES
naming convention: "st_name"
DATA:st_vbak TYPE ty_vbak ,
st_vbap TYPE ty_vbap ,
st_vbpa TYPE ty_vbpa ,
st_makt TYPE ty_makt ,
st_t023t TYPE ty_t023t ,
st_knasl TYPE ty_kna1 ,
st_knash TYPE ty_kna1 ,
st_vbuk TYPE ty_vbuk ,
st_final TYPE ty_final .
DATA:st_fieldcat TYPE slis_fieldcat_alv ,
st_layout TYPE slis_layout_alv .
GLOBAL INTERNAL TABLES
naming convention: "i_name"
DATA:i_vbak TYPE TABLE OF ty_vbak ,
i_vbap TYPE TABLE OF ty_vbap ,
i_vbuk TYPE TABLE OF ty_vbuk ,
i_vbpa TYPE TABLE OF ty_vbpa ,
i_makt TYPE TABLE OF ty_makt ,
i_t023t TYPE TABLE OF ty_t023t ,
i_knasl TYPE TABLE OF ty_kna1 ,
i_knash TYPE TABLE OF ty_kna1 ,
i_final TYPE TABLE OF ty_final .
DATA:i_fieldcat TYPE slis_t_fieldcat_alv ,
i_variant TYPE disvariant .
DEFINE m_fieldcat.
add 1 to st_fieldcat-col_pos.
st_fieldcat-fieldname = &1.
st_fieldcat-ref_tabname = &2.
st_fieldcat-seltext_s = &3.
st_fieldcat-seltext_l = &4.
st_fieldcat-datatype = &5.
append st_fieldcat to i_fieldcat.
END-OF-DEFINITION.
PARAMETERS & SELECT-OPTIONS
aming convention: "p_name" & "s_name"
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
*SELECT-OPTIONS : s_vkorg FOR vbak-vkorg OBLIGATORY,
s_vtweg FOR vbak-vtweg OBLIGATORY,
s_kunrsl FOR vbak-kunnr ,
s_kunrsh FOR vbpa-kunnr ,
s_matnr FOR vbap-matnr ,
s_auart for vbak-auart . "DRFK904686
s_datum FOR sy-datum OBLIGATORY DEFAULT sy-datum."DRFK904686
SELECT-OPTIONS : s_vkorg FOR tvko-vkorg OBLIGATORY,
s_vtweg FOR tvtw-vtweg OBLIGATORY,
s_kunrsl FOR kna1-kunnr ,
s_kunrsh FOR kna1-kunnr ,
s_matnr FOR mara-matnr ,
s_auart FOR tvak-auart . "DRFK904686
PARAMETERS: p_meins TYPE vbap-meins.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b5 WITH FRAME TITLE text-002.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-006 FOR FIELD p_var.
PARAMETERS: p_var TYPE disvariant-variant.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b5.
INITIALIZATION
INITIALIZATION.
Report id assigned to Global variable
w_repid = sy-repid.
EVENTS TABLE BUILD
PERFORM f_eventtab_build USING w_events[].
Processing of listheader
PERFORM f_comment_build USING w_list_top_of_page[].
CLEAR i_variant.
i_variant-report = sy-repid.
Read default display variant (description only, w/o field catalog)
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = c_a
CHANGING
cs_variant = i_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc EQ 0.
p_var = i_variant-variant.
ENDIF.
Start of addition DRFK904686
AT SELECTION-SCREEN ON s_vkorg
Sales Organisation
AT SELECTION-SCREEN ON s_vkorg.
PERFORM f_validate_vkorg.
AT SELECTION-SCREEN ON s_vtweg
Distribution Channel
AT SELECTION-SCREEN ON s_vtweg.
PERFORM f_validate_vtweg.
AT SELECTION-SCREEN ON s_kunrsl
Sold-to-party
AT SELECTION-SCREEN ON s_kunrsl.
IF NOT s_kunrsl[] IS INITIAL.
PERFORM f_validate_cust.
ENDIF.
AT SELECTION-SCREEN ON s_kunrsh
Ship-to-party
AT SELECTION-SCREEN ON s_kunrsh.
IF NOT s_kunrsh[] IS INITIAL.
PERFORM f_validate_shipto.
ENDIF.
AT SELECTION-SCREEN ON s_matnr
Material Number
AT SELECTION-SCREEN ON s_matnr.
IF NOT s_matnr[] IS INITIAL.
PERFORM f_validate_matnr.
ENDIF.
AT SELECTION-SCREEN ON s_auart
Order Type
AT SELECTION-SCREEN ON s_auart.
IF NOT s_auart[] IS INITIAL.
PERFORM f_validate_auart.
ENDIF.
End of addition DRFK904686
AT SELECTION-SCREEN ON VALUE-REQUEST
F4 for Layout Variant
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var.
PERFORM f_get_alv_variant CHANGING p_var.
AT SELECTION-SCREEN ON
Validate Layout Variant
AT SELECTION-SCREEN ON p_var.
IF NOT p_var IS INITIAL.
PERFORM f_check_alv_variant USING p_var.
ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
begin of changes DRFK904686
PERFORM f_fetch_vbuk.
PERFORM f_fetch_vbak.
*perform to fetch the data from vbuk.
*perform to fetch the data from vbak.
PERFORM f_fetch_vbak.
*perform to fetch the data from vbuk.
PERFORM f_fetch_vbuk.
end of changes DRFK904686
*perform to fetch the data from vbpa.
PERFORM f_fetch_vbpa.
*perform to fetch the data from vbap.
PERFORM f_fetch_vbap.
*perform to fetch the material description.
PERFORM f_fetch_makt.
*perform to fetch the material group description.
PERFORM f_fetch_t023t.
*perform to fetch the customer name
PERFORM f_fetch_knasl.
*perform to fetch the customer name
PERFORM f_fetch_knash.
*perofrm to move the data into final table
PERFORM f_move_final.
Finding no of entries in Internal Table
IF LINES( i_final ) EQ 0.
MESSAGE s000 WITH 'No documents found for the selection criteria'(019).
EXIT.
ENDIF.
*perform for fieldcatalog building
PERFORM f_build_fieldcat.
*perform to display the list
PERFORM f_list_dispaly.
*& Form f_validate_vkorg
text
-->P_S_VKORG text
FORM f_validate_vkorg.
SELECT vkorg
FROM tvko
UP TO 1 ROWS
INTO tvko-vkorg
WHERE vkorg IN s_vkorg.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Sales Organization is invalid'(033).
ENDIF.
ENDFORM. " f_validate_vkorg
*& Form f_validate_vtweg
text : This form is used to validate the Distribution Channel
FORM f_validate_vtweg.
SELECT vtweg
FROM tvtw
UP TO 1 ROWS
INTO tvtw-vtweg
WHERE vtweg IN s_vtweg.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Distribution Channel is invalid'(032).
ENDIF.
ENDFORM. " f_validate_vtweg
*& Form f_validate_cust
text: This form is used to validate the Sold-to party .
FORM f_validate_cust.
SELECT kunnr
FROM kna1
UP TO 1 ROWS
INTO kna1-kunnr
WHERE kunnr IN s_kunrsl.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Customer is invalid'(034).
ENDIF.
ENDFORM. " f_validate_cust
*& Form f_validate_shipto
text: This form is used to validate the Ship-to party .
FORM f_validate_shipto.
SELECT kunnr
FROM kna1
UP TO 1 ROWS
INTO kna1-kunnr
WHERE kunnr IN s_kunrsh.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Ship-to party is invalid'(035).
ENDIF.
ENDFORM. " f_validate_shipto
*& Form f_validate_matnr
text: This form is used to validate material.
FORM f_validate_matnr .
SELECT matnr
FROM mara
UP TO 1 ROWS
INTO mara-matnr
WHERE matnr IN s_matnr.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Material is invalid'(036).
ENDIF.
ENDFORM. " f_validate_matnr
*& Form f_validate_auart
text: This form is used to validate Order Type
FORM f_validate_auart .
SELECT auart
FROM tvak
UP TO 1 ROWS
INTO tvak-auart
WHERE auart IN s_auart.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'Order Type is invalid'(037).
ENDIF.
ENDFORM. " f_validate_auart
*& Form sub_get_alv_variant
To display variant selection dialog box
FORM f_get_alv_variant CHANGING p_layvar TYPE disvariant-variant.
CLEAR i_variant.
DATA lw_exit(1) TYPE c.
i_variant-report = sy-repid.
i_variant-username = sy-uname.
Display variant selection dialog box
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = i_variant
i_save = c_a
IMPORTING
e_exit = lw_exit
es_variant = i_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
IF lw_exit IS INITIAL.
p_layvar = i_variant-variant.
ENDIF.
ELSE.
MESSAGE i000 WITH 'No display variants found'(007).
ENDIF.
ENDFORM. " sub_get_alv_variant
*& Form sub_check_alv_variant
to check whether a display variant exists
FORM f_check_alv_variant USING p_layvar TYPE disvariant-variant.
CLEAR i_variant.
i_variant-report = sy-repid.
i_variant-username = sy-uname.
IF p_layvar NE space.
MOVE p_layvar TO i_variant-variant.
Checks whether a display variant exists
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = c_a
CHANGING
cs_variant = i_variant.
ENDIF.
ENDFORM. "f_check_alv_variant
" sub_check_alv_variant
*& Form f_fetch_vbak
from to fetch sales org, dis chanel,sales group sold to party from vbak
FORM f_fetch_vbak .
*{ begin of change DRFK904686
IF i_vbuk IS NOT INITIAL.
SELECT vbeln
auart
vkorg
vtweg
vkgrp
bstnk
kunnr
FROM vbak
INTO TABLE i_vbak
FOR ALL ENTRIES IN i_vbuk
WHERE vbeln EQ i_vbuk-vbeln
AND auart IN s_auart
AND vkorg IN s_vkorg
AND vtweg IN s_vtweg
AND kunnr IN s_kunrsl .
end of change DRFK904686 }
IF sy-subrc EQ 0.
SORT i_vbak BY vbeln.
ELSE.
MESSAGE s000 WITH 'No documents found for the selection criteria'(019).
EXIT.
ENDIF.
ENDIF.
ENDFORM. " f_fetch_vbak
*& Form f_fetch_vbuk
from to fetch open sales doc from vbuk
FORM f_fetch_vbuk .
IF i_vbak IS NOT INITIAL.
SELECT vbeln
FROM vbuk
INTO TABLE i_vbuk
FOR ALL ENTRIES IN i_vbak
WHERE vbeln EQ i_vbak-vbeln
AND ( lfstk NE 'C'
OR fkstk NE 'C' ) .
SELECT vbeln
lfstk
lfgsk
fkstk FROM vbuk
INTO TABLE i_vbuk
WHERE ( ( lfstk EQ 'A'
OR lfstk EQ 'B')
OR ( fkstk EQ 'A'
OR fkstk EQ 'B' ) ) .
ENDIF.
ENDFORM. " f_fetch_vbuk
*& Form f_fetch_vbpa
from to fetch ship to party from vbpa
FORM f_fetch_vbpa .
IF i_vbak IS NOT INITIAL.
SELECT vbeln
kunnr
FROM vbpa
INTO TABLE i_vbpa
FOR ALL ENTRIES IN i_vbak
WHERE vbeln EQ i_vbak-vbeln
AND kunnr IN s_kunrsh
AND parvw EQ c_sh.
ENDIF.
ENDFORM. " f_fetch_vbpa
*& Form f_fetch_vbap
from to fetch sales doc, mat no, mat group,order UOM from vbap
FORM f_fetch_vbap .
IF i_vbpa IS NOT INITIAL.
SELECT vbeln
posnr
matnr
matkl
kwmeng
vrkme
zmeng
zieme
netwr
netpr
FROM vbap
INTO TABLE i_vbap
FOR ALL ENTRIES IN i_vbpa
WHERE vbeln EQ i_vbpa-vbeln
AND matnr IN s_matnr.
ENDIF.
ENDFORM. " f_fetch_vbap
*& Form f_fetch_makt
form to fetch the material description
FORM f_fetch_makt .
IF i_vbap IS NOT INITIAL.
SELECT
matnr
maktx
FROM makt
INTO TABLE i_makt
FOR ALL ENTRIES IN i_vbap
WHERE matnr EQ i_vbap-matnr
AND spras EQ c_en.
ENDIF.
ENDFORM. " f_fetch_makt
*& Form f_fetch_t023t
form to fetch the material group description
FORM f_fetch_t023t .
IF i_vbap IS NOT INITIAL.
SELECT
matkl
wgbez
FROM t023t
INTO TABLE i_t023t
FOR ALL ENTRIES IN i_vbap
WHERE spras EQ c_en
AND matkl EQ i_vbap-matkl.
ENDIF.
ENDFORM. " f_fetch_t023t
*& Form f_fetch_kna1
form to fetch the sold to customer name
FORM f_fetch_knasl .
IF i_vbak IS NOT INITIAL.
SELECT
kunnr
name1
FROM kna1
INTO TABLE i_knasl
FOR ALL ENTRIES IN i_vbak
WHERE kunnr EQ i_vbak-kunrsl.
ENDIF.
ENDFORM. " f_fetch_kna1
*& Form f_fetch_knash
form to fetch the ship to customer name
FORM f_fetch_knash .
IF i_vbpa IS NOT INITIAL.
SELECT
kunnr
name1
FROM kna1
INTO TABLE i_knash
FOR ALL ENTRIES IN i_vbpa
WHERE kunnr EQ i_vbpa-kunrsh.
ENDIF.
ENDFORM. " f_fetch_knash
*& Form f_move_final
form for moving all the fields into the final internal table for
*dispalying the final output.
FORM f_move_final .
SORT : i_vbak BY vbeln,
i_vbpa BY vbeln,
i_makt BY matnr,
i_t023t BY matkl,
i_knasl BY kunnr,
i_vbuk BY vbeln,
i_knash BY kunnr.
*looping at i_vbap and moving mat no,mat group,quantity and
*UOM into final table.
LOOP AT i_vbap INTO st_vbap.
IF st_vbap-kwmeng IS INITIAL.
st_vbap-kwmeng = st_vbap-zmeng.
st_vbap-vrkme = st_vbap-zieme.
ENDIF.
MOVE: st_vbap-matnr TO st_final-matnr,
st_vbap-matkl TO st_final-matkl,
st_vbap-kwmeng TO st_final-kwmeng,
st_vbap-netwr TO st_final-netwr,
st_vbap-vrkme TO st_final-vrkme.
IF p_meins IS INITIAL.
MOVE:st_vbap-vrkme TO st_final-zmein ,
st_vbap-kwmeng TO st_final-zmenge.
ELSE.
CLEAR : w_kwmeng,
w_meins,
w_zmein.
*Order Quantity
w_kwmeng = st_vbap-kwmeng.
*Order Unit
w_meins = st_vbap-vrkme.
*Report Unit
w_zmein = p_meins.
CLEAR : w_umrez1,
w_umren1,
w_umrez2,
w_umren2.
SELECT SINGLE umrez
umren
INTO (w_umrez1,
w_umren1)
FROM marm
WHERE matnr EQ st_vbap-matnr
AND meinh EQ w_meins.
SELECT SINGLE umrez
umren
INTO (w_umrez2,
w_umren2)
FROM marm
WHERE matnr EQ st_vbap-matnr
AND meinh EQ w_zmein.
IF w_umrez1 IS NOT INITIAL AND w_umren2 IS NOT INITIAL.
w_zmenge = w_kwmeng * ( w_umren1 / w_umrez1 ) * ( w_umrez2 / w_umren2 ).
update new report unit and quantity
MOVE p_meins TO st_final-zmein.
MOVE w_zmenge TO st_final-zmenge.
ELSE.
if failed to convert update report unit and quantity with order values
MOVE st_vbap-vrkme TO st_final-zmein.
MOVE st_vbap-kwmeng TO st_final-zmenge.
ENDIF.
ENDIF.
Start of changes DRFK904686
To get the delivery, overall and billing status
CLEAR st_vbuk.
READ TABLE i_vbuk INTO st_vbuk
WITH KEY vbeln = st_vbap-vbeln
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE : st_vbuk-lfstk TO st_final-lfstk,
st_vbuk-lfgsk TO st_final-lfgsk,
st_vbuk-fkstk TO st_final-fkstk.
ENDIF.
End of changes DRFK904686
*reading i_vbak and moving sales doc,sales org,dist chanel,
*sales group,and sold to party into the final internal table
CLEAR st_vbak.
READ TABLE i_vbak
INTO st_vbak
WITH KEY vbeln = st_vbap-vbeln
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE: st_vbak-vbeln TO st_final-vbeln ,
st_vbak-vkorg TO st_final-vkorg ,
st_vbak-vtweg TO st_final-vtweg ,
st_vbak-vkgrp TO st_final-vkgrp ,
st_vbak-auart TO st_final-auart ,
st_vbak-bstnk TO st_final-bstnk , "DRFK904686(+)
st_vbak-kunrsl TO st_final-kunrsl.
ENDIF.
*reading i_vbpa and moving ship to party to the final internal table
CLEAR st_vbpa.
READ TABLE i_vbpa
INTO st_vbpa
WITH KEY vbeln = st_vbap-vbeln
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE st_vbpa-kunrsh TO st_final-kunrsh.
ENDIF.
*reading i_makt and moving material description to the final table
CLEAR st_makt.
READ TABLE i_makt
INTO st_makt
WITH KEY matnr = st_vbap-matnr
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE st_makt-maktx TO st_final-maktx.
ENDIF.
*reading i_t023t
CLEAR st_t023t.
READ TABLE i_t023t
INTO st_t023t
WITH KEY matkl = st_vbap-matkl
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE st_t023t-wgbez TO st_final-wgbez.
ENDIF.
*READINGI_KNASL
CLEAR st_knasl.
READ TABLE i_knasl
INTO st_knasl
WITH KEY kunnr = st_final-kunrsl
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE st_knasl-name1 TO st_final-name1.
ENDIF.
*READINGI_KNASH
CLEAR st_knash.
READ TABLE i_knash
INTO st_knash
WITH KEY kunnr = st_final-kunrsh
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE st_knash-name1 TO st_final-name2.
ENDIF.
APPEND st_final TO i_final.
CLEAR st_final.
ENDLOOP.
ENDFORM. " f_move_final
*& Form f_build_fieldcat
form for building the field catalog
FORM f_build_fieldcat .
m_fieldcat 'VKORG' 'VBAK' 'Sales Organisation'(004) 'Sales Organisation'(004) ' '.
m_fieldcat 'VTWEG' 'VBAK' 'Distribution Channel'(005) 'Distribution Channel'(005) ' '.
m_fieldcat 'VKGRP' 'VBAK' 'Sales Group'(008) 'Sales Group'(008) ' '.
m_fieldcat 'VBELN' 'VBAK' 'Sales Document'(009) 'Sales Document'(009) ' '.
m_fieldcat 'AUART' 'VBAK' 'Order Type'(026) 'Order Type'(026) ' '.
m_fieldcat 'BSTNK' 'VBAK' 'PO number'(031) 'PO number'(031) ' '.
m_fieldcat 'KUNRSL' 'VBAK' 'Sold to Party'(010) 'Sold to Party'(010) ' '.
m_fieldcat 'NAME1' 'KNA1' 'Name Sold to'(020) 'Name Sold to'(020) ' '.
m_fieldcat 'KUNRSH' 'VBPA' 'Ship to Party'(011) 'Ship to Party'(011) ' '.
m_fieldcat 'NAME2' 'KNA1' 'Name Ship to'(022) 'Name Ship to'(022) ' '.
m_fieldcat 'KWMENG' 'VBAP' 'Order Quantity'(012) 'Order Quantity'(012) 'QUAN '(014).
m_fieldcat 'VRKME' 'VBAP' 'Order UOM'(017) 'Order UOM'(017) ' '.
m_fieldcat 'ZMENGE' 'VBAP' 'Report Quantity'(013) 'Report Quantity'(013) 'QUAN '(014).
m_fieldcat 'ZMEIN' 'VBAP' 'Report UOM'(018) 'Report UOM'(018) ' '.
m_fieldcat 'NETWR' 'VBAP' 'Net value'(030) 'Net value'(030) ' '.
m_fieldcat 'MATKL' 'VBAP' 'Material Group Description'(023) 'Material Group Description'(023) ' '. "DRFK904686(-)
m_fieldcat 'WGBEZ' 'T023T' 'Material Group'(015) 'Material Group'(015) ' '. "DRFK904686(-)
m_fieldcat 'MATKL' 'VBAP' 'Material Group'(015) 'Material Group'(015) ' '. "DRFK904686(+)
m_fieldcat 'WGBEZ' 'T023T' 'Material Group Description'(023) 'Material Group Description'(023) ' '. "DRFK904686(+)
m_fieldcat 'MATNR' 'VBAP' 'Material Number'(016) 'Material Number'(016) ' '.
m_fieldcat 'MAKTX' 'MAKT' 'Materia Description'(024) 'Material Description'(025) ' '.
Begin of addition DRFK904686
m_fieldcat 'LFSTK' 'VBUK' 'Delivery status'(027) 'Delivery status'(027) 'DelStat' .
m_fieldcat 'LFGSK' 'VBUK' 'Overall delivery status'(028) 'Overall delivery status'(028) ' '.
m_fieldcat 'FKSTK' 'VBUK' 'Billing status'(029) 'Billing status'(029) ' '.
End of addition DRFK904686
ENDFORM. " f_build_fieldcat
*& Form f_list_dispaly
form for displaying the final output in the Alv grid
FORM f_list_dispaly .
st_layout-cell_merge = 'X'.
st_layout-colwidth_optimize = 'X'.
To display the required data
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = 'X'
i_callback_program = w_repid
is_layout = st_layout
it_fieldcat = i_fieldcat[]
i_save = 'A'
is_variant = i_variant
it_events = w_events[]
TABLES
t_outtab = i_final.
ENDFORM. " f_list_dispaly
" f_EVENTTAB_BUILD
FORM F_DISPLAY_TOP_OF_PAGE *
*form for providing the report heading *
event TOP_OF_PAGE *
FORM f_display_top_of_page. "#EC CALLED
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = w_list_top_of_page.
ENDFORM. "DISPLAY_TOP_OF_PAGE
*& Form f_EVENTTAB_BUILD
Ereignistabelle Bilden
EVENTS TABLE BUILD
-->U_ER_EVENTS[] text
FORM f_eventtab_build USING p_u_er_events TYPE slis_t_event.
FIELD-SYMBOLS: <fs_event> TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = p_u_er_events.
READ TABLE p_u_er_events WITH KEY name = slis_ev_top_of_page
ASSIGNING <fs_event>.
IF sy-subrc = 0.
<fs_event>-form = c_formname_top_of_page.
ENDIF.
ENDFORM. " f_EVENTTAB_BUILD
*& Form F_COMMENT_BUILD
Bearbeitung des Listenkopfes
Processing of listheader
-->U_ER_LIST_TOP_OF_PAGE[] text
FORM f_comment_build USING u_er_list_top_of_page TYPE slis_t_listheader.
DATA: lw_line TYPE slis_listheader.
Type H
CLEAR lw_line.
lw_line-typ = 'H'.
Daily Historical Volume
lw_line-info = text-003.
APPEND lw_line TO u_er_list_top_of_page.
Type S
CLEAR lw_line.
lw_line-typ = 'S'.
Run Date - Sy-datum
WRITE sy-datum TO w_datum MM/DD/YY .
CONCATENATE text-021 w_datum INTO w_text.
lw_line-info = w_text.
APPEND lw_line TO u_er_list_top_of_page.
ENDFORM. " COMMENT_BUILD
Reward the points for useful answers. -
How to swap between to sets of item categories in sales order
Hi,
We receive Idocs from a different system that creates sales order in the R/3 system. For some of these, we want to be able to use an alternative sourcing mode - basically switch between standard POs and 3rd Party POs. The orders has many items, and we find it impractical to manually update all items - also because the order might contain different materials with maybe 5-10 different item categories, that needs to be changed to 5-10 others. This will be very difficult for our business users, since we do not have a simple naming convention of item categories to ease this.
So we are looking for alternative ways, where we can change all items by changing on header level.
We have thought of these alternatives :
1. Change distribution channel. Requires all materials and customers to be set up in 2 DCs - not realistically.
2. Change sales order types using VOV8 alternatives. This seems not to be allowed for materials in BOMs and with E consumption. See other thread named "Can not change SO order type - disallowed by item settings" for more details.
3. What we we really need is changes on schedule line level, and I suppose we could have a logic in MV45AFZZ change this dependent on some user field. But I don't think this will work, as other settings controlled by requirement class etc. will be inconsistent.
Proposals for this are welcome - it should be a common issue.Hi,
We ended up designing a solution where item category was swapped by shipping condition. For shipping condition 11, we simulated that a specific 'usage' was active. It required a few tricks to get the Source determination to run, and a further trick to avoid a re-pricing B to nuke the pricing conditions. This is still draft code, but it seems to work :
Enhancement points ES_SAPFV45P / VBAP_FUELLEN_10 : Ensure usage is set according to shipping condition
data : ld_active type c.
data : ld_no_pricing_vwpos type c.
constants : lc_vwpos_no_pricing(20) type c value 'VWPOS_NO_PRICING'.
Fake change to ensure new item cat determination
( conditions when this is active, setting ld_active )
if sy-subrc is initial
and ld_active = 'X' "Action enabled for company
and t180-trtyp ca 'HV'. " Create/change mode
case vbak-vsbed.
when '11'. " Special logic
t184_vwpos = 'Z001'. " Special T184 usage for direct
clear *vbap-mandt. " simulate change of *vbap
matnr_changed = 'X'." simulate change
ld_no_pricing_vwpos = 'X'. " Flag for suppress B repricing
when '12'. " standard logic
clear t184_vwpos. " Standard T184 usage for indirect
clear *vbap-mandt. " simulate change of *vbap
matnr_changed = 'X'." simulate change
ld_no_pricing_vwpos = 'X'. " Flag for suppress B repricing
when others.
clear ld_no_pricing_vwpos.
endcase.
Memory ID read in MV45AFZB, form USEREXIT_NEW_PRICING_VBAP
export ld_no_pricing_vwpos to memory id lc_vwpos_no_pricing.
endif.
MV45AFZB, form USEREXIT_SOURCE_DETERMINATION : Ensure item category determinations takes usage into consideration
( conditions when this is active, setting ld_active )
if sy-subrc is initial
and w_active = 'X' "Action enabled for company
and t180-trtyp ca 'HV'. " Create/change mode
Get higher-level item category
clear lv_uepos. clear gv_spp_pstyv.
lv_uepos = vbap-uepos.
do 10 times. " to eliminate phantom levels
read table xvbap with key posnr = lv_uepos.
if sy-subrc = 0 and xvbap-pstyv ne lv_zvco.
gv_spp_pstyv = xvbap-pstyv.
exit.
elseif sy-subrc eq 0 and xvbap-pstyv eq lv_zvco.
lv_uepos = xvbap-uepos.
elseif sy-subrc ne 0.
exit.
endif.
enddo.
t184_vwpos set in FV45PFAP_VBAP_FUELLEN
call function 'RV_VBAP_PSTYV_DETERMINE' "Determine using T184
exporting
t184_auart = tvak-auart " Order type
t184_mtpos = maapv-mtpos "Item category group
t184_uepst = gv_spp_pstyv "Higher level-SPP item category
t184_vwpos = t184_vwpos " Usage from FV45PFAP_VBAP_FUELLEN
vbap_pstyv_i = ''
importing
vbap_pstyv = vbap-pstyv.
endif.
MV45AFZB, form USEREXIT_NEW_PRICING_VBAP : Ensure dynamic change of item categories does not trigger repricing type B.
data : ld_no_pricing_vwpos type c.
constants : lc_vwpos_no_pricing(20) type c value 'VWPOS_NO_PRICING'.
Memory ID set in FV45PFAP_VBAP_FUELLENP, FORM VBAP_FUELLEN
import ld_no_pricing_vwpos from memory id lc_vwpos_no_pricing.
if sy-subrc is initial
and ld_no_pricing_vwpos = 'X'.
Skip repricing when mass change item cat
clear new_pricing.
endif.
I hope someone will find it useful. Please notice that Enhancement points was required, so it will not work in older R/3 versions. -
When does the configuration get locked for changes in sales order?
Hi Experts,
I will really appreciate your help me in resolving this issue.
Our client had sales order having BOM item with several sub items.
Here we found that the user was not able to make changes to the Characterstic Value of one of the variant.
The issue was the place where we change the characterstic in sales order was greyed out, it was probably locked. Now even if they were unfrezing and trying to change the characteristic value the system did not allowed means greyed out.
Can you please help me in understanding when do system locks the variants for a material in sales order, in what stage?
Like maybe after the delivery document is created or PGI or some things else.
since i see that the user here did delivered one of the item in the BOM subitem.
Thanks
Kaushik
<Text removed by Moderator, please don't share your personal details on SCN post>
Message was edited by: Jyoti PrakashYes the characterstics were maintained for the main item.
and the delivered item was a subitem for this main item.
So characterstic were maintained for Item 10(Main item) but delivery was done for some of its sub item was item 100 / 120
Also can i know where is this setting or configuration where we configure this to block the configuration if any of the subitem is delivered.
Thanks
Kaushik. -
Varinat configuration copy of batch characteristics from Sale order to production batch
hi experts ,
below is the scenario :
the characteristics and its value which are maintained in the sale order must be copied to batch produced during process order GR .
it was not available in 4.7 but availbale in ECC 6.0 i guess by SAP.
i have created configured material with class type 300 and KMAT . have mainatined CU41 . created material variant and have filled MRP 3 fields.
have created material variant with class type 023 . (also tried with class type 300) .
created sale order for confgured material and item category is also correct . i do not get pop up for material variant which has same charcateristics as that of material configured.
also on after MRP run and process order creation w.r.t Sale order i did GR . but the batch was created with 023 class type and no characteristics were copied .
kindly guide , i have not worked much on variant configuration.
regards,
satishSatish Yadav,
the problem start as you havent got pop up saying there exist a material variant with values you selected for configurable material in sales order, so please check settings related to item catagory.
Also as sales order is created for configurable material , for which material you run MRP?
check below link for more information on material variant and its replacement in sales order.
http://scn.sap.com/docs/DOC-31570
checka nd reply back, Hope it will solve your issue.
Thanks
Ritesh -
Payment Term field to be set as Non Editable in Sales Order
Hi,
I have a requirement, in which the user wants to make the Payment Term field in Sales Order as Non Editable in case the Payment terms is copied from Customer Master to Sales order.
In case no value is copied, it should be editable.
Is there any setting to make this happen.
Can anyone help on this?
Please advise.
Regards,
HarshHarsh,
2 Options,
1 by changing screen variants by SHD0
2. By modifying USEr Exit.
Thanks,
Raja -
How to Configure a Pop Up Message in Sales Orders
Hi,
How can I display a message when creating or changing sales orders? I need the configuration steps for 4.6.
Thanks,
Sai.Hi,
First you need to make an entry of your pop up message in the sales text view of the material master and when the user enters that material, he will be able to see that message. The Config part is in spro/sd/basic func/text control. You need to define the text types, access sequences and the text determ procedures.
You have to maintain the desired text in the material master sales text editor and turn on the indicator 'Display texts during transfer' under Text control in configuration for the sales order-item for the material sales text. This will display a Pop-up message when booking orders
Reward points if found helpfull...
Cheers,
Siva. -
Configurable Material as BOM component in SALES Order BOM
Hi Gurus
I have following
1. Material ABC is a configurable material (variant)
2. BOM of this ABC has further configurable materials
Is it possible to maintain requried charasterstic of the compoents which are configurble at the time of SALES ORDER BOM CREATION.
If yes, how. please explain.
Thanks in advance
sunilDear Sunil,
Please refer to the following link:
http://sap-img.com/sap-sd/sales-bom-implementation.htm
I will suggest you to visit http://sap-img.com/sap-sd.htm. It will give you the overview of SAP SD module.
Moreover there is a separate section of FAQs with answers which will help you in great deal.
Do let me know in case of any queries.
Hope this helps you.
Do award points if you found them useful.
Regards,
Rakesh -
Hi gurus,
in sales order, I need to run Sales Order costing manually after quantity field of SD item is filled. It can be run using CTRL+F7, but I customer don't want to press this buton for every sales order item manualy, so I need to run it in user exit using some function module or bapi ...
Do you have any idean how to do it?
Thanks®ards,
JirkaHi
You can just mark your thread as answered
regards -
Configuration Validation error when booking an Sales Order.
Hi,
Getting an error when booking an sales order ie; "Configuration Validation error".
We are upgrading from 11.5.8 to 12.1.1 and this issue is critical. Please provide your valuable suggestion and advice.
Thanks in advance,
AsifIt seems you use configurator. Is this happening in production or in some test instance?
If it is a test instance, when was it cloned from prod? Did you clone the configurator instance at the same time?
1) You should publish the configurator model from the configurator developer to this new instance.
2) Also, it is possible that the selections made during order entry earlier are not valid anymore due to ECO/BOM changes or due to configurator rule changes. Open the configuration, make any selections if necessary and then click ok.
This will repopulate the order lines then you should be able to book the order.
Hope this helps
Sandeep Gandhi
Independent Techno-functional Consultant
Maybe you are looking for
-
Hi there! I've forgotten the restrictions passcode that I set up. I've failed on 5 attempts. What can I do to get rid of it and access safari again?! I've restored original settings (which happily updated my software), but then restored the last phon
-
Business Rules and Buckset - Urgent
Hi All, I wanna validate a field against list of values in the Oracle Buiness rules. How do I do that in OBR? Could someone please post any pointers/samples for this? Thanks, Prasanna
-
How the profile id has been created for anonymous user
hi all, when i print the ShoppingCurrent.current the below line is displaying Order[type:default; id:o1030002; state:INCOMPLETE; transient:true; profileId:1310002; ] in that how the profile id has been created. thanks in advance shya
-
Error get when tomahawk integrated with tiles
We are getting following error when we integrated tiles with tomahawk: java.lang.NullPointerException at org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:165) at org.ajax4jsf.framew
-
Dreamweaver CC 2014 has stopped working
I've looked through the discussions for an answer and followed all suggestions. Using Dreamweaver CC 2014 on a PC running Windows 7 it is constantly going non-responsive or crashing. This only appears to happen when in the Split Code=>Live mode. Do