Invoice date and Cancel date
Hi ,
How to get invoice date and cancellation date of a sales order.
My requirement is like this: .... i have to list out all the open orders for a particular date, for example today.
For this i need to display sales orders with any status as well as invoiced and cancelled orders which fall under that particular date.
Hope it's clear.
Regards
Sreenivasa Reddy v.
okay here is a sample code to find the open sales orders for a customer and sales area.
just execute the code and see this is fetch ing the open orders .
<b>now for ur logic enhance the code with date in the select statements so that u will capture the open orders with in the range .</b>
regards,
vijay
REPORT ZEX2 MESSAGE-ID arc NO STANDARD PAGE HEADING.
Tables :kna1,vbak.
SELECT-OPTIONS : so_vkorg FOR vbak-vkorg OBLIGATORY,
so_vtweg FOR vbak-vtweg OBLIGATORY,
so_spart FOR vbak-spart,
so_kunnr FOR kna1-kunnr.
DATA : BEGIN OF sales_open OCCURS 0 ,
vbeln LIKE vbak-vbeln,
auart LIKE vbak-auart,
kunnr LIKE kna1-kunnr,
bstnk LIKE vbak-bstnk,
lfstk LIKE vbuk-lfstk,
fkstk LIKE vbuk-fkstk,
gbstk LIKE vbuk-gbstk,
END OF sales_open.
DATA : BEGIN OF itm_sales OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
kwmeng like vbap-kwmeng,
lfsta LIKE vbup-lfsta,
lfgsa LIKE vbup-lfgsa,
fksta LIKE vbup-fksta,
fksaa LIKE vbup-fksaa,
gbsta LIKE vbup-gbsta,
END OF itm_sales.
DATA : l_kunnr LIKE kna1-kunnr,
l_vkorg LIKE vbak-vkorg,
l_vtweg LIKE vbak-vtweg,
l_spart LIKE vbak-spart.
DATA: v_statusl(20) TYPE c,
v_statusb(20) TYPE c,
v_statusf(20) TYPE c,
v_statusg(20) TYPE c,
v_status(20) TYPE c,
v_field(1) TYPE c.
data : v_openqty like vbap-kwmeng.
**Selection Screen Validations.
AT SELECTION-SCREEN.
PERFORM validations.
*& Form Validations
* text
* --> p1 text
* <-- p2 text
FORM validations.
**Customer
IF NOT so_kunnr[] IS INITIAL.
SELECT SINGLE kunnr INTO l_kunnr
FROM kna1
WHERE kunnr IN so_kunnr.
IF sy-subrc NE 0.
MESSAGE e002 WITH text-005.
ENDIF.
ENDIF.
**Sales Organization
IF NOT so_vkorg[] IS INITIAL.
SELECT SINGLE vkorg INTO l_vkorg
FROM tvko
WHERE vkorg IN so_vkorg.
IF sy-subrc NE 0.
MESSAGE e003 WITH text-006.
ENDIF.
ENDIF.
**Distribution Channel
IF NOT so_vtweg[] IS INITIAL.
SELECT SINGLE vtweg INTO l_vtweg
FROM tvkov
WHERE vkorg IN so_vkorg
AND vtweg IN so_vtweg.
IF sy-subrc NE 0.
MESSAGE e004 WITH text-007.
ENDIF.
ENDIF.
**Division
IF NOT so_spart[] IS INITIAL.
SELECT SINGLE spart INTO l_spart
FROM tvta
WHERE vkorg IN so_vkorg
AND vtweg IN so_vtweg
AND spart IN so_spart.
IF sy-subrc NE 0.
MESSAGE e005 WITH text-008.
ENDIF.
ENDIF.
ENDFORM. " Validations
Top-of-page.
PERFORM sales_top_of_page.
Start-of-selection.
PERFORM sales_sel.
*& Form sales_sel
* text
* --> p1 text
* <-- p2 text
FORM sales_sel.
SELECT vbeln auart kunnr bstnk
lfstk fkstk gbstk
INTO TABLE sales_open
FROM vbakuk
WHERE vkorg IN so_vkorg
AND vtweg IN so_vtweg
AND spart IN so_spart
AND kunnr IN so_kunnr
AND gbstk NE 'C'.
LOOP AT sales_open.
WRITE:/4 sy-vline,
5 sales_open-vbeln HOTSPOT ON COLOR 2 INTENSIFIED OFF,
16 sy-vline,
17 sales_open-auart COLOR 2 INTENSIFIED OFF,
27 sy-vline,
28 sales_open-kunnr COLOR 2 INTENSIFIED OFF,
40 sy-vline,
41 sales_open-bstnk COLOR 2 INTENSIFIED OFF,
55 sy-vline,
56 sales_open-lfstk,
76 sy-vline,
77 sales_open-fkstk,
96 sy-vline,
97 sales_open-gbstk ,
117 sy-vline.
HIDE sales_open-vbeln .
ENDLOOP.
ENDFORM. " sales_sel
*& Form sales_top_of_page
* text
* --> p1 text
* <-- p2 text
FORM sales_top_of_page.
WRITE:/4 sy-uline(114),
50 'OPEN SALES ORDERS' COLOR 7 INTENSIFIED ON .
WRITE: /4 sy-vline,
5 'SalesOrder' COLOR 1 ,
16 sy-vline,
17 'OrderType' COLOR 1,
27 sy-vline,
28 'Customer' COLOR 1,
40 sy-vline,
41 'PoNumber' COLOR 1,
55 sy-vline,
56 'Delivery Status' COLOR 1,
76 sy-vline,
77 'Billing Status' COLOR 1,
96 sy-vline,
97 'Processing Status' COLOR 1,
117 sy-vline .
WRITE:/4 sy-uline(114).
ENDFORM. " sales_top_of_page
AT LINE-SELECTION.
SELECT a~vbeln
a~posnr
a~matnr
a~kwmeng
b~lfsta
b~lfgsa
b~fksta
b~fksaa
b~gbsta
INTO TABLE itm_sales
FROM vbap AS a JOIN vbup AS b
ON a~vbeln EQ b~vbeln
AND a~posnr EQ b~posnr
AND b~gbsta NE 'C'
WHERE a~vbeln EQ sales_open-vbeln.
IF NOT sales_open IS INITIAL.
LOOP AT itm_sales.
at end of vbeln .
sum.
v_openqty = itm_sales-kwmeng.
endat.
WRITE:/5 itm_sales-vbeln,
itm_sales-posnr,
itm_sales-matnr,
itm_sales-kwmeng,
itm_sales-lfsta,
itm_sales-lfgsa,
itm_sales-fksta,
itm_sales-fksaa,
itm_sales-gbsta.
ENDLOOP.
ENDIF.
skip 2.
write:/ 'open
Quantity for the order is ', v_openqty .
Similar Messages
-
Pick list date must be between order date and cancellation date
Hi all
A client gets this error:
Pick list date must be between order date and cancellation date Message[173-89]
The date is between that range.
What else could be the reason for it.
ThanksHi
Since the message you received is very user friendly - date must be between....
I guess you have two situation
1.Either operation is incorrect
- Create a similar scenario in your test environment
-Are you receiving same error
-Test with only one item so far
-Check what is the result
2 . You probably need to upgrade your patch level
It might be coming from Application error
Hope this helpls
Bishal -
Hi Experts,
We have a requirement to fetch the value of 'No of days' between Invoice date and due date (Two variable date fields on the template) in an Analysis.
Please let me know the procedure of how to achieve the same.
Regards,
Revit's good for ideas but implementation a bit different
Oracle Business Intelligence Publisher Report Designer's Guide
This function provides a method to get the difference between two dates in the given locale. The dates need to be in "yyyy-MM-dd" format. This function supports only the Gregorian calendar. The syntax is as follows:
<?xdoxslt:date_diff(‘format’, ‘YYYY-MM-DD’, ‘YYYY-MM-DD’, $_XDOLOCALE, $_XDOTIMEZONE)?>
where
format is the time value for which the difference is to be calculated
Example:
<?xdoxslt:date_diff(‘d’, ‘2006-04-08’, ‘2006-04-01’, $_XDOLOCALE, ‘America/Los_Angeles’)?>
returns
-7 -
Sales Invoice date and posting date to be GR date
Hi All
We have intercompany process whre we create PO,delivery with the reference of the PO , then GR with ref to outbound delivery and then invoice w.r.t delivery. Now we want the GR document date to be Posintg date and Billing date while creating invoice document. can any one help in this issue?
Thanks in advanceHi Retail Guy
Pl create a data transfer routine using T Code VOFM with the help of your ABAPer and assign to the copy control.
You could refer to the data transfer routine FV60C011 for sample code.
Don't forget to update the points.
with kind regards
Sundar -
Invoice verification Invoice date,Posting date and Baseline Date
Hi Sap Gurus
Pls Tell Me in detail what Dates should be entered at MIRO transaction,
Invoice date,Posting date and Baseline Date
i presumed that the date on the Invoice slip will be Invoice date,
But in the Invoice the Date is very long back, say a month Older,
the month of Posting as Posting date, but any posting Date made in MIRO will be Paid after 2 or 3 months so in this case what should be the Posting date.
at Base line date in the present company Senario the Discount on Vendor payment is literally valid for all the time , say
In Invoice if the condition is 10% discount if paid in 30 days is given.
but in actual sense the Vendor is paid 10% less even if he is paid after 4 or 6 months also, so in this case what should be the Entry in Baseline date
another senario is the vendor has sent only one Invoice for 2 POs how can this be accomadated in SAP
Pls suggest its Urgent,
Age may have a Bar, But Points No Bar
Thanks and Regards
SathishHi
LIV is nothing but You are getting Invoice from the Vendor for your PO and GR.....and you are checking the Invoice for Price, Qty,Amount etc. by refering the PO and posting the Invoice...
Invoice Date :
The date of Vendor' Invoice...ie) Date at which the vendor Raised the invoice for his supply against your PO...
Posting Date :
The Date at which you actually Verifying Vendor's Invoice and doing the Posting...
base line date :
Generally the Posting Date...
The Imp. of Baseline date is for eg)
If in the Payment Terms if some conditions are maintained like say
10% Discount for Payment With in 30 days, if
PO created on 01.11.2007.
GR done at 10.11.2007.
Invoice slip Received at 30.11.2007 but having the Date on it as 20.11.2007...
So as per your terms you will get 10% Discount if you make the payment on or 20.12.07....
Here if you keep inv. Date: 20.11.2007 and Posting Date : 30.11.2007 and Baseline Date as 30.11.2007 ( you cannot maintain baseline date earlier than Posting date)....even though as per terms the you are eligible for discount if you make the payment on or before 20.11.2007.....as per the system you are still eligible to get the Discount if you make payment on or 30.12.2007( since you have maintained baseline date as 30.11.2007)...
this way Baseline date is Importane...
Generally we use to maintain always Posting Date as Baseline date....
It is advantageous..
Reward if useful
regards
S.Baskaran -
Reason for deviation in invoice date and order date
hi all,
i want to know the field and table name for reason for deviation.
suppose the difference in invoice date and order date is 7 days.
how can i find the reason for this difference.
thanks in advanceDear bala
Obviously there will be a difference between sale order date and billing date in real time scenarios. However, if you want to capture, you have to maintain the relevant text in billing (Goto --> Header --> Header texts).
thanks
G. Lakshmipathi -
Difference between Invoice created date and billing date.
Hi Gurus,
I opened the Billing Document in display mode(T.Code:VF03).In header data I found two tabs one is Created On and another one is Billing Date. Here in the billing document the both dates were different.
Please let me know the difference between Created On date and Billing Date.
your afforts are highly appriciated.
JYothi.Dear Jyothisd,
Invoice created date : Invoice created date is nothing but the date on which you have created the invoice.
Billingdate:Billing date is the date on which you suppose to do the billing for respective customer. Tease billing dates will be proposed to invoice from sales order if it is order related or else actual goods issue date is proposed to billing document as a Billing date if particular billing document is delivery related.
If you want you can change the Actual billing date the result is invoice created date.
Please revert if you want any further clarifications
Thanks&Regards -
Hope someone can help. I have tried to find the best way to do this and can't seem to make sense of anything. I'm using an Access 2013 Database and I have a report that is based on a query. I've created a Report Criteria Form. I
need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date. I then need my report to return only the records that meet all selected criteria. It works fine with a ComboBox and 1 selection but can't
get it to work with a List Box so they can select multiple items. Any help is greatly appreciated while I still have hair left.The query should return all records.
Let's say you have the following controls on your report criteria form:
txtStart: text box, formatted as a date.
txtEnd: text box, formatted as a date.
lbxMulti: multi-select list box.
cmdOpenReport: command button used to open the report.
The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
The report to be opened is rptReport.
The On Click event procedure for the command button could look like this:
Private Sub cmdOpenReport_Click()
Dim strWhere As String
Dim strIn As String
Dim varItm As Variant
On Error GoTo ErrHandler
If Not IsNull(Me.txtStart) Then
strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
End If
If Not IsNull(Me.txtEnd) Then
strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
End If
For Each varItm In Me.lbxMulti.ItemsSelected
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
Next varItm
If strIn <> "" Then
' Remove initial comma
strIn = Mid(strIn, 2)
strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
End If
If strWhere <> "" Then
' Remove initial " AND "
strWhere = Mid(strWhere, 6)
End If
DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
Exit Sub
ErrHandler:
If Err = 2501 Then
' Report cancelled - ignore
Else
MsgBox Err.Description, vbExclamation
End If
End Sub
If SomeField is a text field instead of a number field, change the line
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
to
strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
Pricing date and billing date in va01 transaction
Dear all,
step 1: we have sales order of order type IEL1 in our sap system
step 2: then we do have order type IELB which is called billing request . this is created in va01 transaction against IEL1 sales order type. now here billing document is created.
at the time creation of billing request (order type IELB) we get data flown in from sales order of type (IEL1).
now my requirement is that pricing date and billing date needs to be today's date and not the past date which was in sales order.
please help me in getting current date at the time billing request.
what is exit or modification i have to do.
if not clear please let me know.
thanks
krishnahi,
in va01 i create a sales order of type IEL1 and as well order type IELB.
now in our process we create sales order of type IEL1.
then we create billing request of type IELB with reference to order of type IEL1.
finally we create invoice in transaction code vf01 against order type IELB.
THIS is the process we are following.
thanks
krishna -
Query with Start Date and End Date
Dear Members,
I have done a basic query on to get a report on Sales Invoices processed in a given period with the General Ledger account they were posted to. Minor hassle is that to change the dates, I have to go into the script (see extract below) and change dates manually, save query etc.
Is there a way to have the query, when selected to run, pop up with window, allowing user to input say "start date" and "finish date". I imagine it will require some complex addition to the script below, any assistance will be appreciated.
Regards
Raj
SELECT T1.[DocNum] AS 'Document Number', T1.[DocDate] AS 'Posting Date', T0.[AcctCode] AS 'Account Code', T0.[Dscription] AS 'Item/Service Description', T0.[LineTotal] AS 'Row Total' FROM [dbo].[INV1] T0 INNER JOIN [dbo].[OINV] T1 ON T1.[DocEntry] = T0.[DocEntry] WHERE T1.[DocDate] > (CONVERT(DATETIME, '20110801', 112) ) AND T1.[DocDate] < (CONVERT(DATETIME, '20110831', 112) )Hi Raj,
try this:
/*SELECT FROM [dbo].[OINV] T0*/
declare @StartDate as datetime
/* WHERE */
set @StartDate = /* T0.DocDate */ '[%0]'
/*SELECT FROM [dbo].[OINV] T1*/
declare @EndDate as datetime
/* WHERE */
set @EndDate = /* T0.DocDate */ '[%1]'
SELECT T1.DocNum AS 'Document Number', T1.DocDate AS 'Posting Date', T0.AcctCode AS 'Account Code', T0.Dscription AS 'Item/Service Description', T0.LineTotal AS 'Row Total'
FROM dbo.INV1 T0 INNER JOIN dbo.OINV T1 ON T1.DocEntry = T0.DocEntry WHERE T1.DocDate > @StartDate AND T1.DocDate < @EndDate
Thanks,
Neetu -
MIRO - Posting Date and Document Date
Dear Gurus,
I have a query regarding Posting date and Document Date of Invoice Document.
I want to keep and restrict user to keep Posting Date and Document date same (current date) and want to restrict user from changing posting date, as i want to kep posting date and document date as same. Please suggest if there is any exit or any control i can implement in order to achieve this.
thanks & regards,
Prashant Rathore.Hi
You can create a new Screen / transcation variant, in which the posting date and document date will have displau as field status.
Regards -
The Difference between "Cell Data" and "Dimension Data"?
What is the difference between the tab "Cell Data" and "Dimension Data" in SSAS?
Article quote: " SSAS provides the way to secure analysis services database/cube data from unauthorized access. Analysis services provides secure access by creating object called "roles". After creation of role, user's windows login credential can be used
to enroll into particular role because analysis services identifies user from their windows login credentials . You can protect your data in roles at two levels:
1) Dimension level
2) Cell level
If user has been assigned more than one role, analysis services loop through all assigned roles after login. Analysis services finds all permission level for the particular user and union all the permission levels.
If two roles has contradictory access for user then particular access will be allowed. Suppose role1 says Australia data access and role2 denies Australia data access then access to Australia data will be allowed. "
LINK:
http://www.msbiconcepts.com/2010/10/ssas-data-security-dimension-and-cell.html
Kalman Toth Database & OLAP Architect
IPAD SELECT Query Video Tutorial 3.5 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Diff B/W master data and transaction data
Hi all,
What is the main Diff B/W master data and transaction data. give me some example ?
Thanks in Advance
Krish...hi krish,
MASTER Data is the data that exists in the organization like employee details, material master, customer master, vendor master etc. These are generally created once.
Master data are distributed throughout the company, they are often not standardised and often redundant. As a result it is very costly to offer efficient customer service, keep track of supply chains and make strategic decisions. With SAP Master Data Management (SAP MDM) these important business data from across the company can be brought together, harmonised and made accessible to all staff and business partners. As a key component of SAP NetWeaver, SAP MDM ensures data integrity via all IT systems.
Regardless of the industry, companies often work with different ERP and Legacy systems. The result: the business processes are based on information about customers, partners and products which is displayed in different ways in the systems. If the data are recorded manually, there are more inconsistencies: some data sets are entered several times, others cannot be retrieved by all divisions of the company.
As corporate applications are becoming increasingly complex and produce ever greater amounts of data, the problem is intensified further. Nevertheless, your employees must work with the inconsistent data and make decisions on this basis. The lack of standardised master data easily leads to wrong decisions, which restrict efficiency and threaten customer satisfaction and profitability.
In a word: in order to save costs and ensure your companys success it is necessary to consolidate master data about customers, partners and products, make them available to all employees beyond system boundaries and use attributes valid company-wide for the purpose of description.
TRASNACTION Data - These are the business documents that you create using the master data - Purchase orders, sales orders etc
http://help.sap.com/saphelp_nw2004s/helpdata/en/9d/193e4045796913e10000000a1550b0/content.htm
Regards,
GNK. -
Regarding : Material document data and PO data do not match (Plant)
Hi Gurus,
Please go through this BAPI program.
While uploading it is giving an error ' Material document data and PO data do not match (Plant) '.
Please help regarding this issue.For all Other moment types it is working fine except this 351 moment type.
dATA: i_excel TYPE truxs_t_text_data. "work table for excel upload
DATA: BEGIN OF it_itab OCCURS 100,
docdate(10),
postdate(10),
mvt_type(3), "Movement Type
plant(4), "Plant
lgort(4),
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
material(18), "Material Number
delnote(16),
erfmg(13),
uom(3),
lfmng(13), "Quantity
batch(10) TYPE c,
vfdat TYPE vfdat,
END OF it_itab.
DATA: it_goodsmvt_head TYPE TABLE OF bapi2017_gm_head_01 INITIAL SIZE 100,
it_goodsmvt_code TYPE TABLE OF bapi2017_gm_code INITIAL SIZE 100,
it_goodsmvt_item TYPE TABLE OF bapi2017_gm_item_create INITIAL SIZE 100.
DATA: wa_goodsmvt_head LIKE LINE OF it_goodsmvt_head,
wa_goodsmvt_code LIKE LINE OF it_goodsmvt_code,
wa_goodsmvt_item LIKE LINE OF it_goodsmvt_item.
DATA: w_mat_doc TYPE bapi2017_gm_head_ret-mat_doc,
w_year TYPE bapi2017_gm_head_ret-doc_year.
DATA: BEGIN OF it_errmsg_goodsmvt OCCURS 10.
INCLUDE STRUCTURE bapiret2.
DATA: END OF it_errmsg_goodsmvt.
DATA : obj_type LIKE bapiache09-obj_type,
obj_key LIKE bapiache09-obj_key,
obj_sys LIKE bapiache09-obj_sys.
DATA: v_date1 TYPE sy-datum.
DATA: v_date2 TYPE sy-datum.
DATA: w_lines TYPE i.
DATA: errflag.
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-100.
PARAMETERS: p_file TYPE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK bk1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
Start-of-selection processing
START-OF-SELECTION.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_line_header = 'X'
i_tab_raw_data = i_excel
i_filename = p_file
TABLES
i_tab_converted_data = it_itab[]
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT it_itab.
REFRESH it_goodsmvt_head.
REFRESH it_goodsmvt_item.
CONCATENATE it_itab-docdate6(4) it_itab-docdate3(2) it_itab-docdate+0(2) INTO v_date1.
CONCATENATE it_itab-postdate6(4) it_itab-postdate3(2) it_itab-postdate+0(2) INTO v_date2.
wa_goodsmvt_head-pstng_date = v_date2.
wa_goodsmvt_head-doc_date = v_date1.
wa_goodsmvt_head-ref_doc_no = it_itab-delnote.
wa_goodsmvt_head-pr_uname = sy-uname.
APPEND wa_goodsmvt_head TO it_goodsmvt_head.
Maintain it_goodsmvt_code
wa_goodsmvt_code-gm_code = '04'.
Maintain it_goodsmvt_item
*LOOP AT it_itab.
IF wa_goodsmvt_item-po_number IS INITIAL.
wa_goodsmvt_item-po_number = it_itab-pur_doc.
wa_goodsmvt_item-move_type = it_itab-mvt_type.
wa_goodsmvt_item-MOVE_PLANT = it_itab-plant.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_itab-material
IMPORTING
output = it_itab-material.
wa_goodsmvt_item-material = it_itab-material.
wa_goodsmvt_item-stge_loc = it_itab-lgort.
wa_goodsmvt_item-po_item = it_itab-po_item.
wa_goodsmvt_item-entry_qnt = it_itab-erfmg.
wa_goodsmvt_item-ENTRY_UOM_ISO = it_itab-uom.
wa_goodsmvt_item-po_pr_qnt = it_itab-lfmng.
wa_goodsmvt_item-batch = it_itab-batch.
wa_goodsmvt_item-expirydate = it_itab-vfdat.
wa_goodsmvt_item-NO_MORE_GR = 'X'.
wa_goodsmvt_item-mvt_ind = 'B'.
APPEND wa_goodsmvt_item TO it_goodsmvt_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_goodsmvt_head
goodsmvt_code = wa_goodsmvt_code
IMPORTING
materialdocument = w_mat_doc
TABLES
goodsmvt_item = it_goodsmvt_item
return = it_errmsg_goodsmvt.
Process of commit work
IF it_goodsmvt_head[] IS NOT INITIAL.
DESCRIBE TABLE it_goodsmvt_head LINES w_lines.
ENDIF.
IF it_goodsmvt_item[] IS NOT INITIAL.
DESCRIBE TABLE it_goodsmvt_item LINES w_lines.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
IMPORTING
RETURN =
CLEAR errflag.
READ TABLE it_errmsg_goodsmvt INDEX 1.
IF it_errmsg_goodsmvt-type EQ 'E'.
WRITE:/'Error in function', it_errmsg_goodsmvt-message.
errflag = 'X'.
ELSE.
WRITE:/ it_errmsg_goodsmvt-message.
ENDIF.
IF errflag IS INITIAL.
COMMIT WORK AND WAIT.
IF sy-subrc NE 0.
WRITE:/ 'Error in updating'.
EXIT.
ELSE.
WRITE:/ 'Material Document created successfully and the Document Number for the Material',
wa_goodsmvt_item-material,'is:', w_mat_doc, w_year.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.Hey,
Just wanted to post that in my case this was the error of MVT_IND field in item table. When I made it from 'B' to blank then it worked.
Mine is solved....
Thanks -
Customer invoice doument and cancelled document are showing under openitems
Dear All,
I have created customer invoice in VF01 and cancelled the invoice in VF11.
1.System is showing Invoice document and cancelled document under open items list in FBL5N customer line items.
A. Is this correct?
or
B. When we cancelled the invoice document it should automatically go to cleared items list?
Kindly provide me what is the correct?
Thanks & Regards,
Saisri.Hello,
Once you cancelled the invoice document then you have to clear manually those items in tC: F-32. If you are not cleared then system will show you as open item. After cleared in F-32 then status will change from Open to Close.
Thanks
Para
Maybe you are looking for
-
Can't put CR2 files from Canon Rebel T5i on PSE 11? How do I get them to load?
I keep trying to put my CR2 files on photoshop elements 11 and I can't. It keeps saying my camera is not compatilble. I use a Canon Rebel T5i. How do I get it load? Do I need to update my program? I really need to get this images up and editted asap!
-
Display NULL values in iGrids as space?
Is there any way to tell the iGrid, that it should show columns containing DB NULL simply blank (e.g. one SPACE or anything else which is unvisible)? Actually NULL values are shown as "NA" for numbers resp. "---" for strings, which is rather annoying
-
Hi Gurus, I have extended DEBMAS message type to ZDEB..... in which there is one segment ZKBALID and it is released to version 700. but when i populate that segment in my application program, the idoc is not being generated with status message 02. Wh
-
How to compare any type of image with any Palette ?
How can I compare any image with any Palette file (ex. sample.pal file) ? If that image don't satisified selected Palette file then show me exception or any kind of message. Plz reply me with proper guidence or any hints. Thanks Harshal
-
Suspicious activity in the console log
I was looking at my Macbook Pro's console log and there are some suspicious items in there. For example: sudo killall -HUP mDNSResponder , IP Address changes, websites I've never visited, and something called x-terminal that keeps popping up on my de