BDC Program to Set Reason for Rejection in VA02 in Sales Order Change
Hi i have a requirement i have to set "reason for rejection" in random line items of Change mode of sales order VA02.
I have to develope BDC for this task and i have the list of all open line items which displays in VA05, can any of them can guide me how to develop BDC which will randomly select line items and set reason for rejection in VA02 Sales Order Change transaction.
With Regards,
S.Saravanan
Hi Saravanan,
As mentioned in the previous reply, you can use the FM:SD_SALESDOCUMENT_CHANGE and set the reason code for the line item like for eg: move '03' to IT_INPUT-REASON_REJ. and also set 'U' for update flag in the header structure,
move 'U' to HEAD_INPUT_INX-UPDATEFLAG
this will be best and easy method.
for this, FM,you need to pass the below parameters:
CALL FUNCTION 'SD_SALESDOCUMENT_CHANGE'
EXPORTING
salesdocument = old_order
order_header_in = head_input
order_header_inx = head_input_inx
TABLES
return = return
item_in = it_input
item_inx = ii_input_inx
schedule_in = schedule_input
schedule_inx = schedule_inputx
declare all these structure and internal tables as per documentation of the FM.
hope this helps.let me know if you need more information.
Thanks,
Srini.
Similar Messages
-
How to sets the Reason for Rejection of the Open Sales Order Lines
Hello gurus,
I want to set the Reason for Rejection of the Open Sales Order Lines, Case is like :
If current date is exeed the Auto Void Confirmed Back Order Days(for item level) + date (last responding from customer), then reason for rejection should be set, So i want the logic to find out the date is exceed or not.
Thanks
AnjanaHello anjana,
Actually your question is some confusing, but if u want to get eldest change as active sales order then logic is as follows:
1. On base of OBJNR u have to get UDATE from JCDS table
2. then write logic as:
SORT i_jcds BY objnr stat chgnr DESCENDING.
LOOP AT i_jcds INTO wa_jcds1.
CLEAR lv_stat.
lv_stat = wa_jcds1-stat.
AT NEW objnr.
AT NEW stat.
CLEAR: wa_tab.
wa_tab-objnr = wa_jcds1-objnr.
wa_tab-stat = lv_stat.
ENDAT.
ENDAT.
IF wa_jcds1-inact = 'X'.
CLEAR lv_tabix.
IF sy-tabix > 1.
lv_tabix = sy-tabix - 1.
ELSE.
lv_tabix = 1.
ENDIF.
READ TABLE i_jcds INTO wa_jcds2 INDEX lv_tabix.
IF sy-subrc = 0.
wa_tab-chgnr = wa_jcds2-chgnr.
wa_tab-udate = wa_jcds2-udate.
wa_tab-utime = wa_jcds2-utime.
APPEND wa_tab TO i_tab.
ENDIF.
CONTINUE.
ELSE.
wa_tab-chgnr = wa_jcds1-chgnr.
wa_tab-udate = wa_jcds1-udate.
wa_tab-utime = wa_jcds1-utime.
ENDIF.
AT END OF objnr .
AT END OF stat.
APPEND wa_tab TO i_tab.
ENDAT.
ENDAT.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM i_tab COMPARING objnr stat.
SORT i_tab BY objnr stat udate utime.
DELETE ADJACENT DUPLICATES FROM i_tab COMPARING objnr.
3. now in i_tab table u'll get eldest UDATE
Hope its work for u.
Thanks & Regards,
Sumit Joshi -
Quotations with reason for rejection still appears in sales order creation
Hi,
when i create a sales order with open quotations and if i want to display the list of these quotations, the system displays even the quotations with a reason for rejection. do somebody knows how to customize it in order to have only the open quotations in the list (without reason for rejection)
thaks a lot
ZakThis is the standard config to supress printing on the rejected item. Are you using standard programs or customised ?
-
How to use this CF - BAPI_SALESORDER_CHANGE to set reason for rejec in VA02
Hi gurus,
Can anybody guide me how can i use this Call function in the program to change sales order item data.
Requirement:
I want to set an Reason for Rejection in Open sales orders .
how should i use this call function in program so that i can set - Reason for Rejection in Sales Orders.
Guru's please give in detail like what parameters should i pass and where should i pass.
Regards.
S.SaravananHi,
Use field REASON_REJ ad pass the reason code to item structure and set the flag for the item in ITEMX table.
For more info, look for the where used list of the BAPI 'BAPI_SALESORDER_CHANGE' or search the forum.
Regards
Shiva -
To set reason for rejection for 3rd party order materials
Hello,
I have created the sales order with normal and 3 party materials, with reference to this order i have created the purchase order and delivered normal materials. after some period i am trying to put the reason for rejection code for 3 rd party materials. but the system is showing the error like " subsequent documents already exist for item xyz". then i deleted the purchase requestion and purchase eventhough system is showing the same message while i am trying to put the rejection in the Sales order.
Could you plz let me know the reason why the system is not accepting to put the reason for rejection in the sales order after deleting the PR and PO????
Regards|KSHi,
Please refer to SAP note 392945,356895 and 403524.
Thanks and best regards,
Smile -
Re: Reason Of Rejection field in the Sales Order screen in IC Web client
Hi guys
WE have implemented CRM 6.0 & ECC 6.0
Our call center guys login to IC Webclient to place Standard Orders in the CRM system which replicates to ECC.
Now as most of us know that the Order cannot be rejected once a Delivery Document is created for it. The field becomes Inactive.
Now as per our requirement, we want to enhance this functionality & allow the user to Reject the Order till the Delivery is not Shipped. To make this happen the Reason Of Rejection Field needs to be active even after Delivery is created.
We have made changes to the ECC system & the CRM backend system to allow this functionality.
I was assuming that keeping the field active in CRM backend would automatically keep it active on the IC web client.
However this is not the case.
Can anyone guide me in the right direction. I know that the IC webclient is based out of JAVA.
If someone could tell me if there is any customization that can make this happen or if some part of the code associated to the IC webclient needs to be enhanced to make this happen ?
Thanks
VinitHi Chandrakant
thanks for ur response
But can u be a bit more specific as in where should i view these ?
I am an SD consultant trying to learn CRM .. hence if u could give the tcode or the spro path where i can check these .. it will be great.
Editing the reply
I got thru the view & also went into the attributes.
In that I see different codes for this field.
Get_Rejection
Set_Rejection
Get_M_Rejection
Get_V_Rejection
Get_I_Rejection
Get_P_Rejection
So now my question is whether the deactivation part needs to be coded in one of these or will I have to create one of such codes to achieve my functionality ?
Thanks for ur time
Vinit
Edited by: vinit parkar on Jan 28, 2011 8:28 PM -
User exit for contract start date in sales order change mode.
24.10.2008
Hi Gurus,
I need to disable the 'contract start date' (VEDA-VBEGDAT) field in Contract data tab at header and item level. Can someone suggest a user exit for the same ???
Regards,
UdaynathDear Udyanath,
Please check these User exits with the help of ABAPer
User exits in the program MV45AFZZ
The user exits which you can use for modifications in sales document
processing are listed below.
USEREXIT_FIELD_MODIFICATION
This user exit can be used to modify the attributes of the screen
fields.
To do this, the screen fields are allocated to so-called
modification groups 1 - 4 and can be edited together during a
modification in ABAP. If a field has no field name, it cannot be
allocated to a group.
The usage of the field groups (modification group 1-4) is as
follows:
- Modification group 1: Automatic modification with transaction
MFAW
- Modification group 2: It contains 'LOO' for step loop fields
- Modification group 3: For modifications which depend on check tables or on other fixed information.
USEREXIT_MOVE_FIELD_TO_VBAK
Use this user exit to assign values to new fields at sales document
header level. It is described in the section "Transfer of the
customer master fields into the sales document".
The user exit is called up at the end of the FORM routine
VBAK_FUELLEN.
USEREXIT_MOVE_FIELD_TO_VBAP
Use this user exit to assign values to new fields at sales document
item level. It is described in the section "Copy customer master
fields into the sales document".
The user exit is called up at the end of the FORM routine
VBAP_FUELLEN.
USEREXIT_MOVE_FIELD_TO_VBEP
Use this user exit to assign values to new fields at the level of
the sales document schedule lines.
The user exit is called up at the end of the FORM routine
VBEP_FUELLEN.
USEREXIT_MOVE_FIELD_TO_VBKD
Use this user exit to assign values to new fields for business data of the sales document. It is described in the section "Copy customer
master fields into sales document".
The user exit is called up at the end of the FORM routine
VBKD_FUELLEN.
I hope this will help you,
Regards,
Murali. -
How can I disable the Reason for Rejection field in VA02 line items
Hi,
I dont want the users to be able to change the reason for rejection field in the sales order line items. Can someone please suggest a tried and tested way of doing this
Thanks for reading.Set up an auth object for the field. In userexit field modification check the auth object and set the field to be grayed out if they don't have authority. Users can then not change the value of the field Sample code
IF screen-name = 'VBAP-ABGRU'.
AUTHORITY-CHECK OBJECT 'Z_BLK_REAS'
ID 'ABGRU' DUMMY.
IF sy-subrc EQ 0.
screen-input = 1.
ELSE.
screen-input = 0.
ENDIF.
ENDIF. -
Hi all
I facing problem with Reason for Rejection, while raising a sales order the there is no problem, but when i save the document Reason For Rejection is getting activated automatically and i need to go to change mode and remove the option (Reason for Rejection)
Thanks all
MadhuDear Madhu
Definitely some user exit is applied to either sale document type or customer. Take the help of ABAPer and find out the problem
For information, since Reason for Rejection is applied at item level, you can check whether any of the following user exits are applied.
- User exits in the program MV45AFZZ - USEREXIT_MOVE_FIELD_TO_VBAP
- User exits in the program MV45AFZZ - USEREXIT_SAVE_DOCUMENT
- User-Exits in program MV45AFZB - USEREXIT_CHECK_VBAP
thanks
G. Lakshmipathi -
Sales report based on Reason for Rejection
Hi Guru's,
I have a requirment to get the list of sales orders( Open/ Close) report based on Reason for Rejection.
Please makesure it should be standard not customization and using tables.
Thanks & Regards,
Subbu.Hi subburamaiah
If you want the report you can create a separate SIS report . In that take the input field as a Reason for rejection.. and ask for the output the list of sales orders .Now when you check this user defined report you will give the reason for rejection and check what all orders got rejected on that reason for rejection.
Regards
Srinath -
Changing the status of the sales order item based on reason for rejection
Hi All,
When a Sales order item is rejected then the status at the item level is changed as 'TECO'.When the reason for rejection is removed the status 'Teco' is reset.This status change can be achieved using the user exit 'MV45AFZZ'.But the exit does not allow re-atp calculation whenver a blocked item is release.I have use the exit 'MV45AFZB' ,through this the status change as well as re-atp calculation takes place.But the status changed(Based on reason of rejection) does not appear in the same screen.The change gets reflected only when the sakes order is saved and i open it again.
I want the status change to appear in the same screen.I am doing my code in the form 'userexit_check_vbap' of the exit 'MV45AFZB'. Please let me know if there are any user exits or BADI's available for the same(Changing the status of the sales order item based on reason for rejection ).
Regards,
S.SubasreeHi subburamaiah
If you want the report you can create a separate SIS report . In that take the input field as a Reason for rejection.. and ask for the output the list of sales orders .Now when you check this user defined report you will give the reason for rejection and check what all orders got rejected on that reason for rejection.
Regards
Srinath -
Workflow : How to put condition on Reason for Rejection ( BUS2032 ).
Hi Experts,
The situation is :
I am trying to implement a condition on "Reason for Rejection" . If there is any change in the " Reason for Rejection " ( VA02 ) tab of a particular item , a mail should be sent to a particular person . How do I design a condition so that it would trigger a mail. What all information do I need. A clear suggestion would be very helpful.
Previously we created a workflow in the " BUS2032 " on " CHANGED " event. I tried to get item level information ( old and new ) from the same Bussiness Object. What do I need to do to get the information ( old and new ).
Thanks in advance,
Raghava Vakada.Hi Experts,
Please very very urgent,
It is very helpful to me,
<b>Please Please.......</b>
Thanks in advance,
Raghava Vakada -
Price Inactive during change in reason for rejection
Hi ,
I am facing an issue while providing reason for rejection in VA02.The issue is the price shows as inactive if we cancel the reason of rejection for an item(we get pop-up to select if we want to have reason of rejection or not).As per configuration if reason for rejection(vbap-abgru) has a value then statistical field(vbap-kowrr) will also have value as 'X'.So during providing reason for rejection,if user selects cancel we clear both the values(abgru as well as kowrr).But at this moment the price shows as inactive,but if we press update or save the price shows active.
Please suggest how i can have the price as active after user input,all this is done through an exit 'MV45AFZB'.This is triggered when user provides values for reason for rejection,then popup appears if it satisfies certain conditions.
JetenHi,
Look at the table ORDER_ITEM_IN
Regards. -
Sales Order Creation - Block - Reason For Rejection
Hi Guru
I want following fictionality
1. User Creates Sales Order (VA01)
2. Sales Order Items entered
3. At Item Level, System should insert a required "Reason For Rejection" to item entered like a enitial value.
4. Saving the Sales Order, all Item in that sales order will have a "Reason For Rejection"
5. System should insert a desire value for "Reason for rejection" automatically so even if user forgot to enter, order will not be release for MRP.
6. Then another user will remove this Reason for rejection using VA02.
How to do this. Please suggest all possible ways.
Rewards for solution.
Thk.
Edited by: Sunil Kolambkar on Dec 19, 2007 9:04 AMHi
1. Create a cust doc type
2. For this go for field selection and have default value for Reason for rejection ( as there are multiple choices)
Hope this will answer
With regards
Bhargava
Reward if useful -
Create EDI sales order with reason for rejection set for item
Hello all,
I'm trying create an EDI sales order with item rejected, but I get the following error: Item 000001's configuration can no longer be changed.
I set the reason for rejection in the segment E1EDP01, field ABGRU.
How can create the sales order, with item rejected without error?Use program SDJEDI to simulate the error (see note 380603)
This way you can figure out whether the same issue exists in VA01 or just in the SD EDI process
From reading the issue, it seems you have a configurable item and the line is not open for input and that's why your reason for rejection is ignored.
But SDJEDI should tell you everything.
Run it first to see the BDCDATA your idoc produces.
Then run it again in simulate mode and it should take you very close to the error
Hope this helps
Paul
Maybe you are looking for
-
How do I connect my Synology NAS to my AirPort Extreme base station?
I'm considering replacing an Apple AirPort Extreme base station with my current 5 year old router. I would appreciate if someone could tell me how the AirPort Extreme differs from any regular router. I do not have any OS X devices, but I have a lot
-
Network-related or instance-specific error
Hi, When I run my application through IIS by specifying the server IP and virtual directory in the browser, I am getting the following error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The ser
-
Http Internal Server Error - 500
When using the http-dc library it some times generates a header that looks like: POST / HTTP/1A1 The 'A' appears as 'R' and 'i'....should this not be a dot '.'????? Also, each time this occurs the receiver decides there has been an Internal Server Er
-
Configuring SSL certificates on ALBPM Studio
Hi, I am invoking a web service which is deployed on a web logic server which is a secure server and needs SSL certificates to communicate. I have the certificates but don't know how to configure it to my ALBPM Studio. Can I configure those to studio
-
Nokia 6680 Memory Card problem
I brought an RS DV 512mb card from mobymemory.com and it worked fine for a while but gradually my phone memory decreased and i only have 128kb of phone memory left. This means i cant recieve messages, enter or edit a new contact, change display pic o