SALES RETURN WITH REFERENCE GL accounts
Hello SAP Gurus
when we do salesreturn with reference it will pick the same pricing procedure in returns and the accounting document in credit memo will be a reverse to same gl as in normal pricing procedure
eg customer dr 123
sales ac cr 222
bed cr 333
ecess cr 444
sheces cr 555
vat cr 666
In returns with refernce the same entry will get reversed
eg customer cr 123
sales ac dr 222
bed dr 333
ecess dr 444
sheces dr 555
vat dr 666
But my client requremnt is instead of sales ac 222 he wants a new sale return ac to be debited with new GL 232 but in scenario sales return with refernce its looking impossible to me
Can any one guide me on this is there ne other way out HERE I AM ONLY ADDRESSING SALES RETURN WITH REFERENCE
Hi - try this out -
copy your existing pricing procedure to new one
(eg pric proc zvva01 to zvret01)
for zvret01, assign new gl account determination as required
assign zret01 to billing type for returns
try it out and see if yoiu can make it work
cheers
nandu
Similar Messages
-
How to Restrict Return Sales Order with reference to a cancelled invoice
SAP Standard is allowing to create Return Sales Order with reference to a cancelled invoice which practically should not be allowed.
Has any body worked on this problem and what could be the possible solutions so that return sales orders can not be created against a cancelled invoice.
Kindly share your possible solutions.Hi Standard Process will not allow to create a Sales Order With Cancelled invoice,
Kindly go through at Copy Controls
T.CODE:VTAF
in that some body might have maintained between S1 invoice to RE Sales Document.
Remove the settings then u will be not able to create Sales Order w.r.t to Cancelled Document.
Rewards if Usefull
B.Shyam Sunder
SAP SD Consultant -
G/L Account is missing in item data in sales order with reference to quotation
Dear SAP Guru,
I have a problem in accordance with G/L Account missing sales order. Initially, please find the below lines.
1. If I do the sales order without reference to quotation there is no error in G/L Account missing.
2. If I do the sales order with reference to quotation there is an error that G/L account is missing in item data.
I have checked the VKOA, the settings are fine.
Kindly anyone of you resolve this issue.
Warm Regards
Vidya SagarG/L account is missing in item data.
Many times, it has been discussed on this issue in SCN and please search with the same text so that you will find many threads asking various areas to check. Take the inputs from there and post here still if you have issue.
G. Lakshmipathi -
ORDERS05 - Create a Return with reference to a Sales Order
Hi all,
I'm trying to create a return with reference to a sales order via IDOC ORDERS05. I'm indicating referenced Sales Order number into segment E1EDK02; indicating qualifier (QUALFR = 002) and Sales order number (BELNR). By this way, I create a Customer Return but without reference.
Which fields or segment have to be filled in order to create it correctly?
Thanks
MaríCorrect...
You need something like:
*Get the pricing cond number.
select single knumv from vbak into cond
where vbeln = '0000080347'.
if sy-subrc = 0.
Get the pricing record which are by line item.
select * from konv into table konv_tbl where knumv = cond.
Loop thru them one line at a time.
loop at konv_tbl.
bapi_cond-itm_number = '000010'.
bapi_cond-cond_st_no = konv_tbl-stunr.
bapi_cond-cond_count = konv_tbl-zaehk.
CALL FUNCTION 'BAPI_CUSTOMERRETURN_CREATE'
EXPORTING
RETURN_HEADER_IN = bapi_hdr
BUSINESS_OBJECT = 'BUS2102'
CONVERT = 'X'
IMPORTING
SALESDOCUMENT = bapi_salesdoc
RETURN = BAPI_RET
TABLES
RETURN = bapi_ret_tbl
RETURN_ITEMS_IN = bapi_itm
RETURN_ITEMS_INX = bapi_itm_out
RETURN_PARTNERS = bapi_prtnr
RETURN_SCHEDULES_IN = bapi_schd_lin
RETURN_CONDITIONS_IN = bapi_cond. "pricing
ORDER_TEXT = bapi_text. -
Creating a sales order with reference/BAPI_SALESDOCUMENT_COPY
Hi,
I have to create a sales order with a reference to another order and have to change some fields in the new document.
According to SAP note 370988 the function BAPI_SALESDOCUMENT_COPY should allow to create a sales order with reference to another order.
Unfortunately it doesn't work for me.
The BAPI doesn't return an error and creates a new order but that one is incomplete.
The reason seems to be that VKORG, VTWEG and SPART aren't provided and because of that the new order can't be created completely.
I can find no way to provide these fields to the BAPI.
Has anyone used the BAPI successfully or has found another way to achieve the desired result?
I already checked
batch input: problematic because I have to change partners which are displayed in an table control which can't be controlled reliably from batch input
the second way described in the SAP note: high effort and high risk, as each data field has to be copied explicitly from one represantation to another.
Any help is appreciated.
KaiThat approach would effectively duplicate the implementation of BAPI_SALESDOCUMENT_COPY, wouldn't it?
As there is a lot more data involved than just VBAK/VBAP (e.g texts, partners, conditions, schedules) this is not only a lot more effort it's also harder to get it right, especially since there might also be copy control customization which has to be take into account.
Nevertheless I tried it and it isn't working in my case.
I' have to create a debit memo request (BUS2096) out of a sales order (BUS2032), and BAPIs SALES_ORDER_CREATE* only handle BUS2032. -
HOW TO CONTROL ON CREATION OF SALES ORDER WITH REFERENCE TO EARLIER SO?
Dear All,
I want to contol on creation of Sales order with reference to earlier SO? While creation of sales order our enduser are creating sales order with reference to earlier month SO which I want to restrict. Recently I made changes in sales order like payment terms is grayed, system will atomatically pick pay terms from customer master.Now I am getting correct data also but enduser is using old SO no while creating new SO and old payment data is reflecting in fbl5n.
I want to restrict enduser while creating new SO with ref. to old SO. Only for returns they should be able to use Billing refrence. Pl. suggest how to control the with reference to ealier SO.
NikhilNikhil Deshpande,
If you dont want allow create a sales order in referent to other one, just delete the copy control between these sales order type, so when the user tries to create a SO in reference to other one a message is displayed that is not possible.
Thanks,
Mariano. -
Creation of sales order with reference to Quotation using BAPI
Hi All,
I am using BAPI "BAPI_SALESORDER_CREATEFROMDAT2" for creating sales order. Can you please tell how can I create a sales order with reference to a Quotation.Vinit,
In your header structure, set like this:
hdr-REF_DOC = i_order-vbeln. "assign quotation # to sales order
hdr-REFDOC_CAT = 'B'. "assign Quotation to VBTYP_N.
For each line item, set as follows:
Assigning ref doc to create line item entries in VBFA.
itm-REF_DOC = i_order-vbeln. "quote number
itm-REF_DOC_IT = i_vbap-posnr. "quote line item #
itm-REF_DOC_CA = 'B'.
data: ret_text type BAPIRET2.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
ORDER_HEADER_IN = hdr
convert = 'X'
IMPORTING
SALESDOCUMENT = salesdoc
TABLES
return = ret_tbl
ORDER_ITEMS_IN = itm
ORDER_PARTNERS = prtnr
ORDER_ITEMS_inx = itmx
ORDER_CONDITIONS_IN = conds
ORDER_CONDITIONS_INX = condsx
order_schedules_in = schd_lin.
Don't forget those points. -
Creation of sales order with reference - Zfields in Add data B are not cop
Hi all,
Please help me in the issue . I am creating sales order with reference to returns order . All item fields are getting copied but the Zfields which are added in addtional data b of sales order are not getting copied. Can anyone please let me know the procedure to copy the custom fields.
Thanks in advance,The setting of field when copy by reference is best done in the copy rules.
If you go to transaction VTAA, and look to the order type you are copying to, you will find a data transfer rule number.
Then go to transaction VOFM, menu option DATA TRANSFER -> ORDERS and find the matching data transfer rule number.
Select and press the "Source text" button, here you will find the data from the copied order in structure CVBAK, and you can apply the code to set the VBAK structure fields appropriately.
This should then populate the data on the copied order. -
Create a sales order with reference to another one. (BAPI)
Hi everybody,
I'm trying to create a new sales order with reference to another one (That's important because of the documents flow).
I'm using 'BAPI_SALESORDER_CREATEFROMDAT2' but I couldn´t do it yet. I've read some ideas about this kind of creation in this forum; but I still haven´t found the solution yet.
Some ideas about the BAPI parameters I nedd to complete?
Thanks in advance!!Hi,
Go through this one
*& Report ZSD_R_SALESORDER
report zsd_r_salesorder1 line-size 132 message-id zmmbapi .
*& Created By : shailaja
*& Created on : 13.10.2007
*& Requested By : vardhman
*& Description of program :
Internal table definition *
data: gt_order_header_in like bapisdhead occurs 0 with header line,
gt_return like bapireturn1 occurs 0 with header line, " Return Messages
gt_order_items_in like bapiitemin occurs 0 with header line, " Item Data
gt_salesdocument like bapivbeln-vbeln , "Number of Generated Document
gt_order_partners like bapiparnr occurs 0 with header line, "Document Partner
gt_return1 like bapiret2 occurs 0 with header line.
Data definition *
types: begin of ty_gt_ft_sales ,
partn_numb(10) type n ,"Customer Number 1
partn_role(2) ,"Partner function
sales_org(4) , "Sales Organization
distr_chan(2) , "Distribution Channel
division(002), "DIVISION
doc_type(4) , "Sales Document Type
purch_no(020), "Purchase order
material(18), "MATERIAL
targetquantity(020),"Target quantity
reqqty(020), "Req quantity
reqdate(010), "req date
*REQ_DATE_H(010),
ref_1(012), "Ref
unload_pt(025),
*PARTN_ROLE(2) ,"Partner function
*PARTN_NUMB(10) ,"Customer Number 1
end of ty_gt_ft_sales,
begin of ty_header ,
partn_numb(10) ,"Customer Number 1
partn_role(2) ,"Partner function
sales_org(4) , "Sales Organization
distr_chan(2) , "Distribution Channel
division(002), "DIVISION
doc_type(4) , "Sales Document Type
purch_no(020), "Purchase order
unload_pt(025),
req_date_h(010),
end of ty_header,
begin of ty_item,
material(18), "MATERIAL
targetquantity(020),"Target quantity
reqqty(020), "Req quantity
reqdate(010), "req date
ref_1(012), "Ref
*UNLOAD(025),
end of ty_item.
data : msg(240) type c, " Return Message
e_rec(8) type c, " Error Records Counter
rec_no(8) type c, " Records Number Indicator
s_rec(8) type c, " Successful Records Counter
t_rec(8) type c, " Total Records Counter
v_matnr like mara-matnr,
v_parvw type parvw.
data : gt_ft_sales type standard table of ty_gt_ft_sales with header line.
data : wa_gt_ft_sales type ty_gt_ft_sales,
wa_order_items_in like gt_order_items_in,
wa_gt_ft_sales1 type ty_gt_ft_sales,
wa_header type ty_header,
salesdocument like bapivbeln-vbeln.
selection block for EXCEL UPLOAD FILE
selection-screen begin of block b1 with frame title text-000.
parameters file type ibipparms-path obligatory.
selection-screen end of block b1.
*<<<<AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .
at selection-screen on value-request for file .
perform getname.
form getname.
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
importing
file_name = file.
endform.
*TOP-OF-PAGE.
top-of-page.
skip 3.
format color col_heading inverse on.
write 40 text-001.
format color col_heading inverse off.
skip 1.
format color col_negative inverse on.
write :/ text-002, 13 sy-mandt , 104 text-003, 121 sy-uname,
/ text-004, 13 sy-datum , 104 text-005, 121 sy-uzeit.
format color col_negative inverse off.
skip 3.
*START-OF-SELECTION.
start-of-selection.
perform get_data.
perform bapi.
*end-of-page.
perform result.
form result.
t_rec = e_rec + s_rec.
skip 3.
format color col_total inverse on.
write: /38 text-007, t_rec.
format color col_total inverse off.
format color col_negative inverse on.
write: /38 text-008, e_rec.
format color col_negative inverse off.
format color col_total inverse on.
write: /38 text-009, s_rec.
format color col_total inverse off.
endform.
*& Form get_data
text
--> p1 text
<-- p2 text
form get_data .
call function 'WS_UPLOAD' "#EC *
exporting
filename = file
filetype = 'DAT'
tables
data_tab = gt_ft_sales
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
others = 11.
if sy-subrc 0 .
message e000.
endif.
endform. " get_data
*& Form BAPI
form bapi .
loop at gt_ft_sales into wa_gt_ft_sales.
wa_gt_ft_sales1 = wa_gt_ft_sales.
at new partn_numb.
wa_header-doc_type = wa_gt_ft_sales1-doc_type..
wa_header-sales_org = wa_gt_ft_sales1-sales_org . "'0001'
wa_header-distr_chan = wa_gt_ft_sales1-distr_chan. "'01'
wa_header-division = wa_gt_ft_sales1-division. " '01'
wa_header-purch_no = wa_gt_ft_sales1-purch_no.
wa_header-req_date_h = wa_gt_ft_sales1-reqdate.
call function 'CONVERSION_EXIT_PARVW_INPUT'
exporting
input = wa_gt_ft_sales1-partn_role
importing
output = v_parvw.
wa_header-partn_role = v_parvw.
wa_header-partn_numb = wa_gt_ft_sales1-partn_numb.
wa_header-unload_pt = wa_gt_ft_sales1-unload_pt.
move-corresponding wa_header to gt_order_partners.
move-corresponding wa_header to gt_order_header_in.
append gt_order_header_in.
append gt_order_partners.
endat.
call function 'CONVERSION_EXIT_CCMAT_INPUT'
exporting
input = wa_gt_ft_sales1-material
importing
output = v_matnr.
gt_order_items_in-material = v_matnr .
gt_order_items_in-target_qty = wa_gt_ft_sales1-targetquantity . "'1000'
gt_order_items_in-req_qty = wa_gt_ft_sales1-reqqty.
gt_order_items_in-req_date = wa_gt_ft_sales1-reqdate.
*GT_ORDER_ITEMS_IN-BILL_DATE = wa_GT_FT_SALES1-REQDATE.
gt_order_items_in-ref_1 = wa_gt_ft_sales1-ref_1.
append gt_order_items_in.
clear : wa_gt_ft_sales1,wa_header.
at end of partn_numb.
call function 'BAPI_SALESORDER_CREATEFROMDAT1'
exporting
order_header_in = gt_order_header_in
WITHOUT_COMMIT = ' '
CONVERT_PARVW_AUART = 'X'
importing
salesdocument = salesdocument
SOLD_TO_PARTY =
SHIP_TO_PARTY =
BILLING_PARTY =
return = gt_return
tables
order_items_in = gt_order_items_in
order_partners = gt_order_partners.
ORDER_ITEMS_OUT =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CCARD =
ORDER_CFGS_BLOB =
ORDER_SCHEDULE_EX =
if gt_return-type eq 'E' .
e_rec = e_rec + 1.
read table gt_return with key id = 'V1'.
format color col_negative inverse on.
rec_no = e_rec + s_rec.
concatenate text-006 rec_no ':'
gt_return-message into msg separated by space .
condense msg.
write: / msg.
format color col_negative inverse off.
elseif gt_return-number = '000'.
s_rec = s_rec + 1.
format color col_positive inverse on.
msg = 'SUCCESS'.
condense msg.
write: / msg .
format color col_positive inverse off.
write :/ salesdocument, 'Has been created'.
perform commit_mm.
endif.
clear: gt_return[], msg.
endat.
endloop.
endform. " SLALE_UPLOAD_DATA
*& Form COMMIT_MM
text
--> p1 text
<-- p2 text
form commit_mm .
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = gt_return1.
clear: gt_order_items_inhttp://].\"GT_ORDER_CONDITIONS_IN[.
endform. " COMMIT_MM
inthis pass re_doc field in header...
Edited by: Naresh kumar -
Create sales order with reference to a contract
Hi,
Is there any BAPI/FM which can be used to create a sales order with reference to a contract.
Regards,
Saji.Hi Maninder/Srinivas ,
Could you please provide your valuable inputs on the below query . I have posted a new thread , but haven't got any reply till now . Sorry for posting it again.
I want to create an order with reference to a sales contract using BAPI_SALESORDER_CREATEFROMDAT2 .
1) I passed the contract number to the field REF_DOC at header level , But I got the error message in return table " Document 4000003639 doesn't have document category " where 4000003639 was the contract number . am i missing anything ? Is there any other values that has to be passed ?
2) I also tried passing the contract number at item level but the sales order was created without any reference to the contract .
Thanks in advance
Beena -
Create sales order with reference to archived billing
Hello,
Is it possible to create sales order with reference to archived billing?
Thanks in advance and kind regardsHi,
I think it is possible only return sales orders.
regards
karunakar -
Doubt in creating a sales order with reference to contract
Hi all,
when I create the sales order with reference to contract, in the table VBFA, the field PLMIN is set to zero some times and set to '+' some times. May I know whats the functionality behind this. Any pointers on this will be helpful.
Regards,
A.RathinaprakashHello A.Rathinaprakash,
This is an Indicator which indicates the quantity or value in the target document(means Sales order) has a negative effect, positive effect, or no effect at all on the quantity still to be completed in the source document(means contract).
Example from the Help file..
In sales documents, for example, you can expect the following results:
Quotation -> Sales order: positive effect
Contract -> Return: negative effect
Sales order -> Sales order: no effect
In billing documents, for example, you can expect the following results:
Delivery -> Invoice: positive effect
Delivery -> Cancellation: negative effect
Delivery -> Pro-forma invoice: no effect
Hope it helps..
Regards,
HP -
BAPI: Create Sales order with reference to Quotation
Hi ...
I am using bapi BAPI_SALESOREDER_CREATEFROMDATA2 and
i want to create sales order with reference Quotation... All quotation data like Materials prices and conditions must be copied from reference quotaion which is allready created .....
..Thanks..
..AshishHello,
nice to see that this has already been solved.
But it actually doesnt work in my scenario. Do you have an example coding which will explain your solution.
Mine looks like this:
* Update Flag
ls_header_inx-updateflag = 'I'.
* Angebotskopf einlesen
SELECT SINGLE * FROM vbak INTO ls_vbak
WHERE vbeln = iv_vbeln
AND vbtyp = lc_vbtyp.
IF sy-subrc <> 0.
EXIT.
ENDIF.
* Auftragskopf setzen
ls_header_in-doc_type = ls_vbak-auart.
ls_header_in-sales_org = ls_vbak-vkorg.
ls_header_in-distr_chan = ls_vbak-vtweg.
ls_header_in-division = ls_vbak-spart.
ls_header_in-req_date_h = ls_vbak-VDATU.
ls_header_in-ref_doc = ls_vbak-vbeln.
ls_header_in-refdoc_cat = 'B'.
* Angebots-Partner einlesen (Nur AG und WE)
* Auftrag anlegen
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
order_header_in = ls_header_in
* order_header_inx = ls_header_inx
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* testrun = 'X'
* CONVERT = ' '
IMPORTING
salesdocument = ev_vbeln
TABLES
return = et_return
* order_items_in = lt_items_in
* order_items_inx = lt_items_inx
order_partners = lt_partners
* ORDER_SCHEDULES_IN =
* ORDER_SCHEDULES_INX =
* ORDER_CONDITIONS_IN =
* ORDER_CONDITIONS_INX =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* ORDER_CCARD =
* ORDER_TEXT =
* ORDER_KEYS =
* EXTENSIONIN =
* PARTNERADDRESSES = .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
Unfortunatly this just makes the reference to the quotation but does not takeover ALL data from header and pos level.
Thanks and regards
Markus Armbruster -
Inclusive Free Goods Return with Reference
Hi Gurus!
Could you help me with my question below
We are tring to create a sales order return with reference to a billing document. This billing document has two items where one is a standard item and the other is a inclusive free goods item.
Example:
1 AAAHi
When you have creating the sales order with reference to billing document the items will be copied into the return order without any changes
You can check the controls in the copy control VTAF
Regards
Damu -
Dear SD gurus,
Can you please tell me, during sales return with Excise in J1IH, which process need to be selected.
Either "Other adjustments" or cancel "excise invoice".
regards,
KumarDear Kumar
For updation of excise related sales returns, run T.Code J1IH and do the following:-
Customer Credit
Choose the Additional excise input the original excise invoice reference, document year, company code, plant and excise group and execute. There input manually what value you need to give credit and save.
Cenvat Debit
Choose Other Adjustment and here also, maintain the datas whatever you input as above and save.
thanks
G. Lakshmipathi
Maybe you are looking for
-
HOW DO YOU CONVET AN ORACLE DATABASE FILE TO A TXT FILE?
Is there a way in a program unit of a form to convert an ORACLE database file into TXT format? When the file gets created, I want to use the text file in a distribution list for sending email. My code in the program unit is: Insert into THE_IMO_EMAIL
-
How do I print a web page and email a link to a web page?
I cannot print a web page like I could with earlier Firefox versions. Nor can i email a link to a web page. nor can I load google toollbar. i am very disappointed with firefox for not supportring these features.
-
Whatsapp message and photo albums problem
Good day, How can I transfer whatsapp message from the old iPhone to new iPhone? In addition, I have created many photo album using the phone itself, each time after I sync, only photo show up in the new iPhone and not showing any album created previ
-
Two different X sessions; one on tty7/one on tty8
Is it possible to have user foo have an X session on tty7 and to have user bar have an X session on tty8? One can run gdm or lightdm and then 'switch users' but I'd rather not have a greeter at all and just rely on Clt+Alt+F7 or Clt+Alt+F8. Thanks.
-
Problem with 0HRPOSITION_ATTR
Hi All, I am having a problem in extracting the data with 0hrposition_attr , the load runs for 30 hours. Could some one help me out on this. Thanks, Krish Message was edited by: Krish