GR reversal for ERS vendor
Hi
I have a scenario where in agaisnt a return PO, I have done 161 mvt type and send the material back to vendor and IR is also done. Vendor is a ERS vendor.
Now I want to reverse the whole process.
How to reverse the invoice document posted through ERS, MR8M transaction is not working.?
And will if we cancel 161 material doc and then run MRRL, will the invoice doument be reversed.
Any info will be of great help to me..
Regards
Prashant
Prashant,
I am not sure why MR8M is not working. It would help if you had clarified whether you got any specific error message or if there are other reasons for it to not work when you tried this option.
The other way to do this would be to reverse the GR manually (mvt 162) and then run MRRL again to post an invoice cancellation document that can be sent to the vendor. For this to work though, the 'Rev GR despite IR' flag needs to be set for mvt 162 in OMBZ (config). Also before setting this flag, you need to ensure that this does not affect other non-ERS returns using mvt 162.
Hope this helps.
H Narayan
Similar Messages
-
GOA distribution to R3 - Tax Code for ERS vendors
Hi all,
Having an issue with GOA distribution to R3 for evaluated receipt settlement vendors. For ERS vendors, tax code is a required field. There is not a tax code field in the GOA and this is not being passed in any iDoc segment I can find. My current tax configuration is calculate tax in backend, i have maintained tax codes I0.U1, I1 with U1 set as default. As shopping carts are transferred from R3 they are assigned U1 as expected and PO's generated in the BE from these external requirements are getting the U1 as expected. The problem is with contracts and scheduling agreements. Everything is fine unless the vendor has the ERS indicator set. Tax code becomes a required field.
Has anyone else experienced this? I've' researched SDN and everything talks about shopping carts and PO's, which is working for us. I cant find any info on the contract distribution. I've investigated the BADI's associated with tax calculation in SRM but I'm not sure these meet the requirement for ERS vendors.
Am I missing configuration? Is one of the tax badi's the way to go? Any information is appreciated.
SRM SERVER 550
R3 46c
Classic - Plan-Driven Procurement
Thanks,
JustinHi
<b><u>Please refer to few OSS notes.</u></b>
<u>Note 1033458 - Item level Tolerance values in GOA not transferred to R/3</u>
<u>1012486 Important Information on upgrading ERP-Systems in HA-Setups
1014820 Indicators reset in Active versions when line item added
1029026 Prob in conf. create-Diff in ERS flag for SRM and R/3 vendor
849567 Output Control for ERS Invoice in Program BBPERS
703876 Release note SRM Server 5.0 SP00
762984 SRM40-SUS: Implementation of customer enhancement fields
1010791 Flag Confirmation based Invoice Verification set erroneous
1018855 Vendor flag POR expected is not replicated from backend
Note 967107 - New logic for grouping backend contracts out of a GOA
909516 SRM40/CTR:New line itm distribution flag cannot be unchecked
1025863 Wrong Currency code during GOA replication to R/3
1009872 Contracts : GOA Distribution value divided by 100
908058 CheckMan errors - Attachment Original transfer for Contracts
940632 Distribution incorrect-When invalid Purchasing Org entered
942008 SRM Distribution of GOA to R/3 System: Scales missing
945029 Distribution of Target Quantity to QW8 failed
880097 Attachment Original transfer for Contracts
989367 Performance improvement for new GOA distribution logic
916562 CM/CND: Dump in distribution of GOA with deleted line items
922172 Contract attachment distribution enhancements
925014 More than one attachment not getting distributed to backend
923627 Attachement transfer to backend with possible file formats
923227 Attachments transfer not working in Background
937221 CTR: Impossible to modify distribution in Initial Upload GOA
967107 New logic for grouping backend contracts out of a GOA
</u>
<i>Incase this OSS notes, don't work, then</i>
<u>Please try do this as well. Uncheck the ERS indicator, but then also pass tax codes from from GOA.
Then try out again.</u>
<u>For BADIs and other useful information, refer to these forum links</u><b>GOA Distribution SRM 5.0-ECC 6.0 - Account Category & Multiple Distribution
Distribution of GOA in R/3
Source determination in backend (R/3) for distributed contract i.e. GOA
FM or BADI s' used to create a GOA
Transaction For Creating GOA
<b>Incase nothing helps, Please raise a OSS message with SAP as well.</b>
Hope this will help.
Please reward suitable points, incase it suits your requirements.
Regards
- Atul -
Can an Invoice be posted manually for a P.O in which ERS is enabled and against an ERS vendor ?
Thanks
Vinay SridharHi,
There is nothing wrong.
If you run the ERS settlement program after the MIRO you will find that this will NOT create a duplicate payment.
If by doing this you are having a problem, then let us know and we will see what we can do to help.
If you are just curious as to whether this is correct or not then it is perfectly OK to post an invoice for an ERS PO. If this happens AFTER the settlement then the invoice would be blocked for payment. If it happens BEFORE the settlement has been run then it would NOT be blocked for payment (GR qty equals Inv qty) but the settlement program should then NOT create a payment.
You can decide to stop this from happening by configuring the message to E or leave it as W and continue.
Steve B -
Reset and reverse for various vendor groups.
Hello,
We have two distinct vendor groups. For Group A there is no tax implications. For Group B withholding tax is mandatory.
When we are trying to run TCode FBRA for the Group A vendors, we find that it's giving me the option of 'Reset' and 'Reset & Reverse'.
Whereas when we are trying to run TCode FBRA for Group B, it is doing a 'reset and reverse' directly even without giving us an option. In other words, the screen which comes after we run FBRA, which gives us the three options to selct from, simply does ot show. Instead it generates a new reversal documents on its own for Group B.
We would like to check where this configuration is maintained. Can someone please advise.
Regards,
Suvarghya DuttaHello,
Some more information that I could gather. I found that the system now prompts the message: Payment was posted with withholding tax. Clearing document will be reversed. Do you want to continue. However this message appears ONLY when I am mentioning something under the Withholding Tax tab at the time of FB60.
If I don't mention anything under that tab then the system is prompting the two usual issues, ie. 'Only Resetting' and 'Reset & Reverse'. How come the FBRA screen is governed by the 'withholding tax' tab in FB60?
Regards,
Suvarghya -
User Exit for ERS (Evaluated Receipt Settlement ) while Creating PO
Hi All ,
i have a Specific Requirement ,
When ever an PO is created for ERS Vendors , The ERS check box at Invoice tab would be Ticked by default for specific document types ,
But for all other document type this ERS tick from PO item detail (invoice Tab) should get unticked automatically.
Is there a User Exit for ERS at PO level
Thx ,Hi
<b>Please verify that the user running the report as well as the RFC User in the SRM system must have proper authorization to execute the report. For time being, provide SAP_ALL profile, and then try out the same.
Also, check whether for the R/3 back-end Vendor, the ERS is set or not.</b>
Please confirm this -
You want to set the ERS indicator for the documents sent from SRM into R/3 system. Is this your requirement ?
Hope this will help.
Please reward suitable points.
Regards
- Atul -
How to reverse an ERS invoice?
Hi all,
I need some advice as to what is the proper way of reversing an ERS invoice. Example. I have a purchase order which the invoice was generated via ERS. Later we realized that the GR we have done was incorrect. Invoice has been issued for that GR. The FI went ahead to create a credit memo via MIRO and then the warehouse people have reverse the GR.
Is this the correct way? I did testing. When I tried to reverse the GR without cancelling the invoice, I will receive an error message that says Deficit of PU IR quantity 1.000 CRT.
Then I tried cancelling the invoice via MR8M but the system Igives me a meesage saying nvoice doc. 5105614721/2008 was created via evaluated receipt settlement
I read through some forums and some have advised that we can set the indicator at this setting SPRO-> Materials Management -> Inventory Management and Physical Inventory -> Goods Receipt -> For GR-Based IV, Reversal of GR Despite Invoice. I am not able to set this indicator as the client's environment will not allow me to do so.
Appreciate any advice.Hi,
MR8M will not work.
The other way to do this would be to reverse the GR manually (mvt 162) and then run MRRL again to post an invoice cancellation document that can be sent to the vendor. For this to work though, the 'Rev GR despite IR' flag needs to be set for mvt 162 in OMBZ (config). Also before setting this flag, you need to ensure that this does not affect other non-ERS returns using mvt 162.
Reference. stated in Help.sap.com
Credit memos can also be created using ERS: if an invoice has already been posted for a goods receipt and goods have since been returned, the system automatically generates a credit memo for the returned quantity during the next ERS run.
reg,
Ashok -
How to clear noted items for a vendor
Hi Gurus,
User has crated a noted item in F-47, when i run FBL1N for that vendor and select the noted itmes option, it shows open itmes which i created using F-47, now the user do not want to pay the Vendor.
How can i clear the doc which i have created using F-47, i tryied F-48 but it will not work as user do not want to pay the vendor and also i tryied FB08 still it is not working.
RegardsHi,
You have to reverse those noted items throough T.code FB08 with proper reversal reason.
Can you give what is the error message you getting in tcode FB08.
Regards,
Sankar -
Reversal of GRN,Vendor Excise Invoice,If QM is active.
Dear Experts,
Please guide me how to reverse the entry if.......
MIGO (Part 1) done
Usage Detail (UD) done/Not done
J1IEX (Part 2) done
MIRO done
I did.....
Created Raw material PO with Cenvatable tax code
MIGO with capture excise invoice
UD for inspection lot
Part 2 posted-J1IEX_P
Update excise register-J2I5
Print excise register-J2I6
MIRO
What i tried for cancellation......
Raised Credit memo
Cancellation of GRN (PART 1)
J1IEX- POST (In this step when i am selecting post and entering vendor excise invoice no.or internal excise invoice no.system is not allowing me to post as it is displaying one message i.e Excise invoice has already been posted for the vendor.
Please guide me where i am missing ,what i will do for inspection lot and is there any other steps to be taken for cancellation of excise entry if QM active.
Regards
RahulHi AKPT,
Thanks for the prompt reply. Actually this is the case of wrong GRN posting.We can do return delivery process by using movment type 122 but when i checked the status of excise invoice in MIGO (More data- Misc.tab) the status is 'POSTED'. How i can convert it into cancel.
OR
If QM active for the material only we have vendor return delivery option or If cancellation option available then how i will follow the steps.As i tried this option but after cancellation of migo when i am posting the excise invoice system is displaying one message i.e Excise invoice has already been posted for the vendor.
Please help me
Regards
Rahul -
Hi Team,
I have created a PO and the GR done. Vendor ERS activated and PO line item ERS and GR based Inv Verification also activated.
Further how do i need to post the invoice..
To my knowledge ERS means upon GR invoice will be automatiocally created and send to vendor.. whr can i see the invoice for the GR i have done..
Vijayhello
Your have to execute the T. code MRRL after which only invoice is posted for the vendor. It will update the Purchase order History .
in Selection screen of MRRL. enter
Company code
Plant
Posting date of Goods Receipt
Vendor
In Processing Option
Doc selection should always 3
Before execute Test run the ERS Invoice,
Regards
Mahesh Naik. -
Invoice Planning: Allowing ERS vendor
Hi,
We have implemented Invoice planning. Making our supplier an ERS vendor prevents us from doing the normal procurement process for using the supplier as they are an ERS vendor.
The process of activating the ERS for the sake of using invoice planning, and deactivating for the sake of doing normal procurement is not feasible for us.
How do we use the same vendor for both Invoice planning or ERS and normal procurement (MIRO) processes?
thanksHi
you should use vendor subrange. You can see vendor subrange in purchasing view addition data.
Define two subranges. You will have two sets of purchasing data like order currency, ERS tick, schema. etc.
Then you can have two info records based on vendor subrange. So that same vendor you have for ERS and other procurement. It will solve your problem.
See this link for more information on vendor subrange
http://help.sap.com/erp2005_ehp_04/helpdata/EN/e2/f3333956bd9f05e10000000a11402f/frameset.htm
Write to me if it is not solved.
Regards
Antony -
Hi
I have one Issue
1. I have created one Purchase Order for trading goods material; there I have forgotten to enter the Freight Condition type .
2. But I did GR and cleared the Invoice for main vendor.
3. More over This Material is sold to customer also. So there is no sufficient stock for this to reverse the GR .
4. Since I have not entered Freight condition type I was not able to clear the invoice to Freight vendor.
5. How to clear the invoice for Freight Vendor ,Plz give me suggestion in this regard.
Thanks in advancehi,
Cancel your last invoice and add the condition in the new invoice doc...and then post it....
You can cancel it from MIRO tcode itself...
After this clear it...
Hope it helps..
Regards
Priyanka.P -
Hi,
I am setting up ERS vendor. I cant do ERS settlement.The settings done are - in vendor master 'AutoevalGRSttlmnt' is checked, in Purchase info record 'no ERS' is unckecked, in PO Invoice tab - 'GR Based IV,ERS,IV ' are checked. In MRRL -' Test Run ' is checked. But a message comes when MRRL is executed in information text ''ERS settlement: No message was found for partner J&J/company code''. J&J is the ERS vendor. In MRR1 for output type, for key combination CoCode/ Vendor when I enter vendor name this message shows "The condition record entered already exists". Message transmission medium is 1(print output).I am stucked up. I have to do ERS settlement.
regards
AshokPlease check the following in customizing
Customizing
Make the settings as described in Customizing for Materials Management (MM) under Logistics Invoice Verification ® Evaluated Receipt Settlement (ERS) ® ERS Invoice Numbering.
Master Data
In each vendor master record, enter the number group that you created in the Tax Number 4 field, on the Control screen.
Day-to-Day Activities
When you create an ERS invoice, the system generates an ERS invoice number and stores it in the Reference Document Number field in the invoice header.
Note that the ERS invoice number does not replace the accounting document number. It is generated in addition to it.
Then check this
Evaluated receipt settlement must be flagged in the purchase order item.
The vendor must be flagged as being subject to ERS in the vendor master record.
The goods receipt must refer to a purchase order.
Goods-receipt-based Invoice Verification must be defined for the purchase order item.
A tax code must have been maintained in the purchase order item.
The order price of the materials may not be an estimated price. -
Report to find open items and close items for given vendor
Hi All,
What are the steps needed to write a REPORT to find out
open and close items for a given vendor.
Which are the fields i'll have to take and what are the comparisons i'll have to make.
I know,
BSIK is for open Vendor &
BSAK for closed Vendors..
what are the conditions i'll have to check.
Thanks in Advance..
Pradeep AlexHi Pradeep,
This report I developed is definitely useful to you.
*& Report ZFI_PROV_IT_VENDOR
REPORT ZFI_VENDOR.
TYPE-POOLS: slis.
tables: BKPF,
BSEG,
bsik,
bsak,
bsid,
bsad,
lfa1,
t005u, "Region Description
J_1IMOVEND.
TYPES: BEGIN OF ty_bkpf,
bukrs type bkpf-bukrs,
belnr TYPE bkpf-belnr,
gjahr type bkpf-gjahr,
blart TYPE bkpf-blart,
budat TYPE bkpf-budat,
END OF ty_bkpf.
types: begin of ty_J_1IMOVEND,
lifnr type lfa1-lifnr,
J_1IPANNO type J_1IMOVEND-J_1IPANNO,
J_1ICSTNO type J_1IMOVEND-J_1ICSTNO,
J_1ISERN type J_1IMOVEND-J_1ISERN,
end of ty_J_1IMOVEND.
TYPES: BEGIN OF ty_bseg,
belnr TYPE bseg-belnr,
gjahr type bseg-gjahr,
bschl TYPE bseg-bschl,
umskz type bseg-umskz,
shkzg type bseg-shkzg,
wrbtr TYPE bseg-wrbtr,
hkont type bseg-hkont,
lifnr TYPE bseg-lifnr,
END OF ty_bseg.
types: begin of ty_t005u,
bland type t005u-bland,
bezei type t005u-bezei,
end of ty_t005u.
types: begin of ty_lfa1,
lifnr type lfa1-lifnr,
name1 type lfa1-name1, "35
ort01 type lfa1-ort01, "35
ort02 type lfa1-ort02, "35
pfach type lfa1-pfach, "10
pstlz type lfa1-pstlz, "10
regio type lfa1-regio, "3
stras type lfa1-stras, "35
ktokk type lfa1-ktokk,
telf1 type lfa1-telf1, "16
telf2 type lfa1-telf2, "16
end of ty_lfa1.
types: begin of ty_bsik,
bukrs type bsik-bukrs,
lifnr type bsik-lifnr,
augdt type bsik-augdt,
augbl type bsik-augbl,
belnr type bsik-belnr,
budat type bsik-budat,
blart type bsik-blart,
shkzg type bsik-shkzg,
wrbtr type bsik-wrbtr,
end of ty_bsik.
types: begin of ty_bsid,
bukrs type bsid-bukrs,
lifnr type bsid-kunnr,
augdt type bsid-augdt,
augbl type bsid-augbl,
belnr type bsid-belnr,
budat type bsid-budat,
blart type bsid-blart,
shkzg type bsid-shkzg,
wrbtr type bsid-wrbtr,
end of ty_bsid.
types: begin of ty_out2,
lifnr type bsik-lifnr,
wrbtr type bsik-wrbtr,
end of ty_out2.
types: begin of ty_out,
lifnr type lfa1-lifnr,
name1 type lfa1-name1,
addr(162) type c,
J_1IPANNO type J_1IMOVEND-J_1IPANNO,
J_1ICSTNO type J_1IMOVEND-J_1ICSTNO,
J_1ISERN type J_1IMOVEND-J_1ISERN,
opbal type bseg-wrbtr,
purch type bseg-wrbtr,
PAYM type bseg-wrbtr,
grdeb type bseg-wrbtr,
othdeb type bseg-wrbtr,
othcre type bseg-wrbtr,
tds type bseg-wrbtr,
bal type bseg-wrbtr,
blart type bkpf-blart,
bschl type bseg-bschl,
end of ty_out.
types: begin of ty_bsegtemp,
lifnr TYPE bseg-lifnr,
end of ty_bsegtemp.
types: begin of ty_bsegnew,
wrbtr TYPE bseg-wrbtr,
lifnr TYPE bseg-lifnr,
end of ty_bsegnew.
data: it_bsik type table of ty_bsik with header line,
it_bsid type table of ty_bsid with header line,
it_bsak type table of ty_bsik with header line,
it_out2 type table of ty_out2 with header line,
it_out3 type table of ty_out2 with header line.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
it_listheader TYPE slis_t_listheader,
it_alvevent TYPE slis_t_event,
gt_events TYPE slis_t_event WITH HEADER LINE.
DATA: I_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA : wa_fieldcat TYPE slis_fieldcat_alv,
wa_listheader TYPE slis_listheader,
wa_alvevent TYPE slis_alv_event.
DATA: WA_SORT TYPE SLIS_SORTINFO_ALV.
DATA: ls_line TYPE slis_listheader.
DATA : g_repid LIKE sy-repid, " Program ID
g_layout TYPE slis_layout_alv. " Layout Workarea
DEFINE m_fieldcat.
wa_fieldcat-col_pos = &1. " Fieldcat column postion
wa_fieldcat-fieldname = &2. " Field name
wa_fieldcat-DO_SUM = &3.
wa_fieldcat-seltext_m = &4. " Column Text
wa_fieldcat-outputlen = &5.
append wa_fieldcat to it_fieldcat.
clear wa_fieldcat.
END-OF-DEFINITION.
DATA: wa_lfa1 TYPE ty_lfa1,
wa_bkpf TYPE ty_bkpf,
wa_bkpf1 type ty_bkpf,
wa_bsegtemp type ty_bsegtemp,
wa_bsegnew type ty_bsegnew,
wa_bsegnew1 type ty_bsegnew,
wa_J_1IMOVEND type ty_J_1IMOVEND,
wa_t005u type ty_t005u,
wa_bseg TYPE ty_bseg,
wa_out TYPE ty_out.
DATA: gt_out TYPE STANDARD TABLE OF ty_out,
gt_out1 TYPE STANDARD TABLE OF ty_out,
gt_lfa1 TYPE STANDARD TABLE OF ty_lfa1,
gt_bsegtemp type standard table of ty_bsegtemp with header line,
gt_bsegnew type standard table of ty_bsegnew with header line,
gt_bsegnew1 type standard table of ty_bsegnew with header line,
gt_J_1IMOVEND type standard table of ty_J_1IMOVEND,
gt_bkpf1 TYPE STANDARD TABLE OF ty_bkpf WITH HEADER LINE,
gt_t005u type standard table of ty_t005u,
gt_bseg TYPE STANDARD TABLE OF ty_bseg WITH HEADER LINE,
gt_bkpf TYPE STANDARD TABLE OF ty_bkpf WITH HEADER LINE.
selection-screen begin of block b1 with frame title text-001.
select-options: s_budat for bkpf-budat obligatory,
s_ktokk for lfa1-ktokk obligatory.
s_wrbtr for bseg-wrbtr.
parameters: p_bukrs type bkpf-bukrs obligatory default '1000'.
p_gjahr type bkpf-gjahr obligatory.
p_lifnr type bseg-lifnr obligatory default '300040',
p_ktokk type lfa1-ktokk obligatory default 'Z200'.
selection-screen end of block b1.
START-OF-SELECTION.
PERFORM sub_fetch_data.
PERFORM sub_process_data.
END-OF-SELECTION.
PERFORM sub_build_fieldcat.
PERFORM sub_build_layout.
PERFORM eventtab_build USING gt_events[].
PERFORM comment_build USING it_listheader[].
PERFORM sub_disp_data.
*& Form SUB_BUILD_FIELDCAT
text
--> p1 text
<-- p2 text
FORM sub_build_fieldcat .
sort gt_out by name1.
*DEFINE M_SORT.
ADD 1 TO WA_SORT-SPOS.
WA_SORT-FIELDNAME = &1.
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = &2.
APPEND WA_SORT TO I_SORT.
END-OF-DEFINITION.
*m_sort 'NAME1' 'X'.
*M_SORT 'ADDR' 'X'.
m_fieldcat 1 'LIFNR' ' ' text-026 10.
m_fieldcat 2 'NAME1' ' ' text-006 35.
m_fieldcat 3 'ADDR' ' ' text-007 162.
m_fieldcat 4 'J_1IPANNO' '' text-008 40.
m_fieldcat 5 'J_1ICSTNO' '' text-009 40.
m_fieldcat 6 'J_1ISERN' '' text-010 40.
m_fieldcat 7 'OPBAL' '' text-011 18.
m_fieldcat 8 'PURCH' '' text-012 18.
m_fieldcat 9 'PAYM' '' text-013 18.
m_fieldcat 10 'GRDEB' '' text-014 18.
m_fieldcat 11 'OTHDEB' '' text-020 18.
m_fieldcat 12 'OTHCRE' '' text-021 18.
m_fieldcat 13 'BAL' '' text-023 18.
m_fieldcat 14 'TDS' '' text-022 18.
ENDFORM. " SUB_BUILD_FIELDCAT
*& Form SUB_BUILD_LAYOUT
text
--> p1 text
<-- p2 text
FORM sub_build_layout .
g_layout-zebra = 'X'.
g_layout-colwidth_optimize = 'X'.
ENDFORM. " SUB_BUILD_LAYOUT
*& Form EVENTTAB_BUILD
text
-->P_GT_EVENTS[] text
FORM eventtab_build USING gt_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_events.
READ TABLE gt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE 'TOP_OF_PAGE' TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
ENDFORM. " EVENTTAB_BUILD
*& Form COMMENT_BUILD
text
-->P_IT_LISTHEADER[] text
FORM comment_build USING p_it_listheader TYPE
slis_t_listheader.
data: v_text(30) type c,
v_datelow(10) type c,
v_datehigh(10) type c,
v_month(2) type c,
v_day(2) type c,
v_year(4) type c.
v_day = s_budat-low+6(2).
v_month = s_budat-low+4(2).
v_year = s_budat-low+0(4).
concatenate v_day '.' v_month '.' v_year into v_datelow.
clear: v_day,v_month,v_year.
v_day = s_budat-high+6(2).
v_month = s_budat-high+4(2).
v_year = s_budat-high+0(4).
concatenate v_day '.' v_month '.' v_year into v_datehigh.
clear: v_day,v_month,v_year.
concatenate 'From' v_datelow 'To' v_datehigh into v_text
separated by space.
clear: v_datelow, v_datehigh.
ls_line-typ = 'H'.
ls_line-info = text-116.
APPEND ls_line TO p_it_listheader.
ls_line-typ = 'S'.
ls_line-key = text-090.
ls_line-info = v_text.
APPEND ls_line TO p_it_listheader.
ENDFORM. " COMMENT_BUILD
*& Form TOP_OF_PAGE
text
--> p1 text
<-- p2 text
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader.
ENDFORM. " TOP_OF_PAGE
*& Form SUB_DISP_DATA
text
--> p1 text
<-- p2 text
FORM sub_disp_data .
g_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
it_fieldcat = it_fieldcat[]
is_layout = g_layout
i_save = 'U'
it_events = gt_events[]
IT_SORT = I_SORT[]
TABLES
t_outtab = gt_out1[].
ENDFORM. " SUB_DISP_DATA
*& Form sub_fetch_data
text
--> p1 text
<-- p2 text
form sub_fetch_data .
select bukrs
belnr
gjahr
blart
budat
from bkpf
into table gt_bkpf
where budat in s_budat
and bukrs = p_bukrs
and gjahr = p_gjahr
and blart in ('KR','KG','KZ','RE','DK','Z1','AB','SA','KA','DZ').
select belnr
gjahr
bschl
umskz
shkzg
wrbtr
hkont
lifnr
from bseg
into table gt_bseg
for all entries in gt_bkpf
where belnr = gt_bkpf-belnr
and gjahr = gt_bkpf-gjahr
and gjahr = p_gjahr
and bschl in (21,25,29,31,50,39,38,19,35).
and kunnr in gt_
and lifnr = '0000300019'.
select belnr
gjahr
bschl
umskz
shkzg
wrbtr
hkont
kunnr
from bseg
appending table gt_bseg
for all entries in gt_bkpf
where belnr = gt_bkpf-belnr
and gjahr = gt_bkpf-gjahr
and gjahr = p_gjahr
and bschl in (21,25,29,31,50,39,38,19).
break manukapur.
sort gt_bseg by lifnr bschl.
delete adjacent duplicates from gt_bseg comparing all fields.
loop at gt_bseg into wa_bseg.
if wa_bseg-lifnr is not initial.
move: wa_bseg-lifnr to wa_bsegtemp-lifnr.
append wa_bsegtemp to gt_bsegtemp.
endif.
endloop.
delete adjacent duplicates from gt_bsegtemp comparing lifnr.
select lifnr
name1
ort01
ort02
pfach
pstlz
regio
stras
ktokk
telf1
telf2
from lfa1
into table gt_lfa1
for all entries in gt_bseg
where lifnr = gt_bseg-lifnr
and ktokk in s_ktokk.
and lifnr = '0000300030'.
select bland
bezei
from t005u
into table gt_t005u
for all entries in gt_lfa1
where bland = gt_lfa1-regio
and land1 = 'IN'
and spras = sy-langu.
select lifnr
J_1IPANNO
J_1ICSTNO
J_1ISERN
from J_1IMOVEND
into table gt_J_1IMOVEND
for all entries in gt_bseg
where lifnr = gt_bseg-lifnr.
*select bukrs
belnr
blart
budat
from bkpf
into table gt_bkpf1
where budat < s_budat-low.
and zfdbt < s_budat-low.
select
wrbtr
lifnr
from bseg
into table gt_bsegnew
for all entries in gt_bkpf
where belnr = gt_bkpf-belnr
and xopvw = 'X' .
and zfbdt < s_budat-low.
select bukrs
lifnr
augdt
augbl
belnr
budat
blart
shkzg
wrbtr
from bsik
into table it_bsik
for all entries in gt_bseg
where lifnr = gt_bseg-lifnr
and lifnr = '0000300000'
and bukrs = '1000'
and budat <= s_budat-low.
select bukrs
lifnr
augdt
augbl
belnr
budat
blart
shkzg
wrbtr
from bsak
appending table it_bsik
for all entries in gt_bseg
where bukrs = '1000'
and lifnr = gt_bseg-lifnr
and lifnr = '0000300000'
and budat <= s_budat-low
and augdt > s_budat-low.
select bukrs
kunnr
augdt
augbl
belnr
budat
blart
shkzg
wrbtr
from bsid
into table it_bsid
for all entries in gt_bseg
where bukrs = '1000'
and kunnr = gt_bseg-lifnr
and kunnr = '0000300000'
and budat <= s_budat-low.
select bukrs
kunnr
augdt
augbl
belnr
budat
blart
shkzg
wrbtr
from bsad
appending table it_bsid
for all entries in gt_bseg
where bukrs = '1000'
and kunnr = gt_bseg-lifnr
and kunnr = '0000300000'
and budat <= s_budat-low
and augdt > s_budat-low.
if it_bsid[] is not initial.
append lines of it_bsid to it_bsik.
endif.
*delete gt_bsegnew where lifnr <> '0000300000'.
*break manukapur.
*sort gt_bsegnew by lifnr.
*loop at gt_bsegnew into wa_bsegnew.
*collect wa_bsegnew into gt_bsegnew1.
*endloop.
loop at it_bsik .
it_out2-lifnr = it_bsik-lifnr.
*it_out1-budat = it_bsik-budat.
*it_out1-blart = it_bsik-blart.
if it_bsik-SHKZG = 'H'.
it_out2-wrbtr = it_bsik-wrbtr.
else .
it_out2-wrbtr = it_bsik-wrbtr * -1.
endif.
append it_out2.
clear: it_out2, it_bsik.
*endif.
*clear it1.
endloop.
sort it_out2 by lifnr.
loop at it_out2.
it_out3-lifnr = it_out2-lifnr.
it_out3-wrbtr = it_out2-wrbtr.
collect it_out3.
clear: it_out3, it_out2.
endloop.
endform.
*& Form sub_process_data
text
--> p1 text
<-- p2 text
form sub_process_data .
*sort gt_bsegtemp by lifnr .
sort gt_bseg by lifnr bschl.
sort gt_bsegnew by lifnr.
sort it_out3 by lifnr.
*loop at gt_bsegnew into wa_bsegnew.
*at end of lifnr.
*sum.
*endat.
*endloop.
sort gt_bkpf by blart.
loop at gt_bseg into wa_bseg.
if wa_bseg-lifnr is not initial.
read table gt_lfa1 into wa_lfa1 with key lifnr = wa_bseg-lifnr.
move: wa_lfa1-name1 to wa_out-name1,
wa_lfa1-lifnr to wa_out-lifnr.
read table gt_t005u into wa_t005u with key bland = wa_lfa1-regio.
concatenate wa_lfa1-stras ',' wa_lfa1-ort01 ','
wa_lfa1-ort02 ',' wa_t005u-bezei ','
wa_lfa1-pfach ','
wa_lfa1-pstlz ',' 'Ph:'
wa_lfa1-telf1 ','
wa_lfa1-telf2
into wa_out-addr separated by space.
read table gt_J_1IMOVEND into wa_J_1IMOVEND with key lifnr = wa_bseg-lifnr.
move: wa_J_1IMOVEND-J_1IPANNO to wa_out-J_1IPANNO,
wa_J_1IMOVEND-J_1ICSTNO to wa_out-J_1ICSTNO,
wa_J_1IMOVEND-J_1ISERN to wa_out-J_1ISERN.
read table gt_bkpf into wa_bkpf with key belnr = wa_bseg-belnr.
if wa_bkpf-blart = 'RE' and wa_bseg-bschl = 31 or
wa_bkpf-blart = 'KR' and wa_bseg-bschl = 31.
if wa_bseg-shkzg = 'H'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-purch = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-purch = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'KR' and wa_bseg-bschl = 50.
*wa_out-tds = wa_out-tds + wa_bseg-wrbtr.
if wa_bseg-shkzg = 'H'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-tds = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-tds = wa_bseg-wrbtr * -1.
endif.
endif.
*wa_out-tds = wa_bseg-wrbtr.
endif.
if wa_bkpf-blart = 'KG' and wa_bseg-bschl = 21.
*wa_out-grdeb = wa_out-grdeb + wa_bseg-wrbtr.
if wa_bseg-shkzg = 'H'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-grdeb = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-grdeb = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'RE' and wa_bseg-bschl = 21.
*wa_out-grdeb = wa_out-grdeb + wa_bseg-wrbtr.
if wa_bseg-shkzg = 'H'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-grdeb = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-grdeb = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 25
*or wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 29
**and wa_bseg-umskz = 'A'
or wa_bkpf-blart = 'SA' and wa_bseg-bschl = 25.
if wa_bseg-shkzg = 'H'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-paym = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
*wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
wa_out-paym = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'DK' and wa_bseg-bschl = 31.
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'AB' and wa_bseg-bschl = 31.
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'SA' and wa_bseg-bschl = 31.
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 38.
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'DZ' and wa_bseg-bschl = 19
and wa_bseg-umskz = 'A'.
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'KA' and wa_bseg-bschl = 39
and wa_bseg-umskz = 'G' or
wa_bseg-umskz = 'H' or
wa_bseg-umskz = 'J' or
wa_bseg-umskz = 'L' OR
wa_bseg-umskz = 'A'.
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'KA' and wa_bseg-bschl = 35.
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if ( wa_bkpf-blart = 'KZ' and wa_bseg-bschl = 29 )
and wa_bseg-umskz = 'A' or
wa_bseg-umskz = 'B' or
wa_bseg-umskz = 'I' or
wa_bseg-umskz = 'M' or
wa_bseg-umskz = 'O' or
wa_bseg-umskz = 'V'.
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'AB' and wa_bseg-bschl = 27.
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
if wa_bkpf-blart = 'Z1' and wa_bseg-bschl = 21 .
if wa_bseg-shkzg = 'H'.
wa_out-othcre = wa_bseg-wrbtr.
else.
if wa_bseg-shkzg = 'S'.
wa_out-othcre = wa_bseg-wrbtr * -1.
endif.
endif.
endif.
**if wa_bseg-shkzg = 'H'.
***wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
**wa_out-othdeb = wa_bseg-wrbtr.
**else.
**if wa_bseg-shkzg = 'S'.
***wa_out-purch = wa_out-purch + wa_bseg-wrbtr.
**wa_out-othdeb = wa_bseg-wrbtr * -1.
**endif.
**endif.
**endif.
***if wa_bkpf-blart = 'AB' and wa_bseg-bschl = 27.
wa_out-othdeb = wa_bseg-wrbtr.
***endif.
***if wa_bkpf-blart = 'Z1' and wa_bseg-bschl = 21.
wa_out-othdeb = wa_bseg-wrbtr.
***endif.
read table it_out3 with key lifnr = wa_bseg-lifnr binary search.
on change of wa_bseg-lifnr.
*move: wa_lfa1-name1 to wa_out-name1,
wa_lfa1-lifnr to wa_out-lifnr.
wa_out-opbal = it_out3-wrbtr.
endon.
*if wa_out-opbal is not initial.
*wa_out-bal = wa_out-opbal + wa_out-purch - wa_out-grdeb - wa_out-othdeb + wa_out-othcre.
**else.
*wa_out-bal = wa_out-purch - wa_out-grdeb - wa_out-othdeb + wa_out-othcre.
*endif.
wa_out-bal = wa_out-opbal + wa_out-purch + wa_out-paym + wa_out-grdeb + wa_out-othdeb + wa_out-othcre.
at end of lifnr.
*wa_out-bal = wa_out-opbal + wa_out-purch - wa_out-grdeb - wa_out-othdeb + wa_out-othcre.
append wa_out to gt_out.
*collect wa_out into gt_out.
clear wa_out.
clear it_out3.
clear wa_bsegnew1.
endat.
endif.
clear: wa_bseg, wa_bkpf, wa_J_1IMOVEND.
endloop.
loop at gt_out into wa_out.
collect wa_out into gt_out1.
endloop.
endform. " sub_process_data
Regards,
Santosh Kumar M. -
How to create one primary key for each vendor
Hi all
i am doing IDOC to jdbc scenario
i am triggering idoc from R/3 and the data is going into DB table vendor through XI.
structures are as follows:
sender side: ZVendorIdoc (this is a customized IDOC , if i triger IDOC for multiple vendors then it triggers only 1 idoc with multiple segment )
Receiver side:
DT_testVendor
Table
tblVendor
action UPDATE_INSERT
access 1:unbounded
cVendorName 1
cVendorCode 1
fromdate 1
todate 1
Key1
cVendorName 1
if i trigger idoc for multiple vendors ,for example vendor 2005,2006 and 2010 . then i can see that the only key comes from the very first field (2005) and the whole record for vendor 2005,2006 and 2010 goes into the table with this(2005) as a primary key
now again if i send data for these three vendor 2005, 2006 , 2010, in which record for the vendor 2005 is same and for 2006 and 2010 are different than it takes 2005 as a primary key and it does not update the data in the table.
my requirement is like this: for each vendor there should be one unique key assigned.
for above said example there should come three keys one for each vendor .
could you please help me how to do this???????????Hi,
In Mapping Make the statement is 0-unbounded.For each vendor create a statement.This will solve your problem.
Regards,
Prakasu.M -
Shipment freight cost not posted for 4th vendor after GR
Hello,
I have tested and found that isystem limits the number of vendors in Shipment to 3 only.
It sort all the vendors in the shipment and create the entries for 1st three vendors (after sorting smallest to largest vendor number) and after GR posting it creates the entires in accouting doc for 3 vendors only.
I have 5 stages in the shipment and 5 items in shipment cost doc. If number of vendors are upto 3 it works fine if there are 4 or more vendors are added then it doesnot create the entries for those vendors.
Please suggest.
regards,
JPSHello,
Any idea.
Maybe you are looking for
-
VGA to DVI to hdmi? For the new Mac Mini.
I'm dying to buy a new Mac Mini but I'm not ready to replace my monitor yet. Sadly, it's a VGA flat panel. It's connected to my current 2009 Mini by a VGA to DVI adapter. The new Mini comes with a DVI to HDMI adapter. Can I plug my VGA to DVI adap
-
My ipod shuffle 2th does not seem in iTunes or PC
When i connect my device, the led shows orange color three times, and that's it. I've tried with windows 8 and XP, with iTunes 11 and 7. There's an interesting thing, i can reproduce all my songs in my device, but i can't sync with iTunes because it
-
Navigation menubar not working in Safari
Amazed I can't figure it out on my own. The menu works in IE and FF, but not Safari. http://www.danielosterday.com Anyone? Thanks! Dan.
-
Lumia 925 initial setup with no SIM card
Hi, Is it possible to do the initial setup of a Lumia 925 with no SIM card inserted? Cheers,
-
WLC Internal and External DHCP
I am currently using the Internal DHCP component within my 5508 Controller with software version 7.0.166.0. This seems to be working fine as the Vlan Routed interface connected to it via the Dynamic Trunk Port is functioning as l have the ip-helper