T158 - What's TCODE is used to maintain table T158
Hi Guru,
I'm looking for the TCODE or IMG paht that is used to maintain table T158?
T158 - Transaction Control: Inventory Management.
Now we're implementing but we don't use standard document type (BLART). We create a new document type such as "GR instead of WE", "GI instead of WA" and "GA instead of PR". Now we have a problem when we goods receipt, the system shown message about WE does not exist in T003 (check entry). I've debug it and seen table: T158 determine document type. So I've changed value in T158 directly as "MIGO_GR H GR GA WE". It's work!! we can post GR but I don't know the IMG path or TCode to maintain that table. Please kindly advice.
Thank you very much.
Edited by: Saiyaman on Aug 24, 2009 7:58 PM
Edited by: Saiyaman on Aug 24, 2009 8:00 PM
Hi,
GO to SM30 enter the table name and then click on customization and then click on skip
regards
Similar Messages
-
What is the main use of mseg table
what is the main use of mseg table. when we should actually use this. please explain me in detail. then what is the difference betweeln mseg and mara table.
MM Process flow:
The typical procurement cycle for a service or material consists of the following phases:
1. Determination of Requirements
Materials requirements are identified either in the user departments or via materials planning and control. (This can cover both MRP proper and the demand-based approach to inventory control. The regular checking of stock levels of materials defined by master records, use of the order-point method, and forecasting on the basis of past usage are important aspects of the latter.) You can enter purchase requisitions yourself, or they can be generated automatically by the materials planning and control system.
2. Source Determination
The Purchasing component helps you identify potential sources of supply based on past orders and existing longer-term purchase agreements. This speeds the process of creating requests for quotation (RFQs), which can be sent to vendors electronically via SAP EDI, if desired.
3. Vendor Selection and Comparison of Quotations
The system is capable of simulating pricing scenarios, allowing you to compare a number of different quotations. Rejection letters can be sent automatically.
4. Purchase Order Processing
The Purchasing system adopts information from the requisition and the quotation to help you create a purchase order. As with purchase requisitions, you can generate Pos yourself or have the system generate them automatically. Vendor scheduling agreements and contracts (in the SAP System, types of longer-term purchase agreement) are also supported.
5. Purchase Order Follow-Up
The system checks the reminder periods you have specified and - if necessary - automatically prints reminders or expediters at the predefined intervals. It also provides you with an up-to-date status of all purchase requisitions, quotations, and purchase orders.
6. Goods Receiving and Inventory Management
Goods Receiving personnel can confirm the receipt of goods simply by entering the Po number. By specifying permissible tolerances, buyers can limit over- and underdeliveries of ordered goods.
7. Invoice Verification
The system supports the checking and matching of invoices. The accounts payable clerk is notified of quantity and price variances because the system has access to PO and goods receipt data. This speeds the process of auditing and clearing invoices for payment.
Common Tables used by SAP MM:
Below are few important Common Tables used in Materials Management Modules:
EINA Purchasing Info Record- General Data
EINE Purchasing Info Record- Purchasing Organization Data
MAKT Material Descriptions
MARA General Material Data
MARC Plant Data for Material
MARD Storage Location Data for Material
MAST Material to BOM Link
MBEW Material Valuation
MKPF Header- Material Document
MSEG Document Segment- Material
MVER Material Consumption
MVKE Sales Data for materials
RKPF Document Header- Reservation
T023 Mat. groups
T024 Purchasing Groups
T156 Movement Type
T157H Help Texts for Movement Types
MOFF Lists what views have not been created
A501 Plant/Material
EBAN Purchase Requisition
EBKN Purchase Requisition Account Assignment
EKAB Release Documentation
EKBE History per Purchasing Document
EKET Scheduling Agreement Schedule Lines
EKKN Account Assignment in Purchasing Document
EKKO Purchasing Document Header
EKPO Purchasing Document Item
IKPF Header- Physical Inventory Document
ISEG Physical Inventory Document Items
LFA1 Vendor Master (General section)
LFB1 Vendor Master (Company Code)
NRIV Number range intervals
RESB Reservation/dependent requirements
T161T Texts for Purchasing Document Types
Transaction codes:
RFQ to Vendor - ME41
Raising Quotation - ME47
Comparison of Price - ME49
Creation of PO - ME21N
Goods Receipt - MIGO
Invoice (Bill PAssing) - MIRO
Goods Issue - MB1A
Physical Inventory - MI01( Create doc)
MI04 (Enter Count)
MI07 (Post)
Also please check this links.
http://www.sapgenie.com/sapfunc/mm.htm
http://www.sap-basis-abap.com/sapmm.htm
Go thro this link, u will get a clear picture abt the MM flow.
MM flow
MM flow
MM flow
<b>Reward Points if it is helpful</b>
Thanks
Abhay Singh. -
What is the basic use of Interface Tables
Hi there,
We are trying to connect and send data to the EBS Oracle System.
We are facing different scenarios and I don't know which one to use in which scenario?
So if I add a vendor for instance, should I use the Interface tables or call a stored procedure?
When using interface tables would I have a feedback? Success/Failure and if there is a failure would I have a detailed exception (Name too long, id mendatory...etc.)
Same question for stored procedure
A simple answer would be very helpful, and a link to any documentation would be great
ThanksHi,
using interface tables is - normally - accompanied by a concurrent request, which does data validation, generation of a report and data import as well.
So - if you are using correct data structures - using interface tables and running matching concurrent request might save you a lot of time.
Most concurrent requests which are processing open interface tables are generating some detailled reports on records being processed or having
failed validation. In addition you normally have some kind of status flag in open interface tables indicating processing state and sometimes error codes
as well (see gl_interface table or ap_invoices_interface tables).
When using api packages, you may have more flexibility (sometimes more features, when looking at the TCA apis), but you have to do some extra
coding for validation, populating default values and so on.
API Packages do always return a success/error state, which can be extracted in detail by using fnd_msg_pub package - but you have to code it by
yourself.
I would say open interface tables are a bit easier to handle whereas some of the api packages need more experience (e.g. when talking about TCA apis,
there are some steps to do in the right order to get a customer created).
Regards -
What the difference and use between of TABLES and SY-REPID?
Hi,
Experts,
I have came accross 2 cases that i can't able understand
EX1:
TABLES: VBAP -
>( Here also Appplication Server(AS) creates Wrokarea of Structure VBAP but, by
data: v_vbeln like vbap-vbeln. double clicking on variable v_vbeln AS taking me to DDIC VBAP table VBELN field then what the using declaring tables. )
( and )
DATA: VBAP TYPE VBAP -->( Here also Appplication Server(AS) creates Wrokarea of Structure VBAP data: v_vbeln like vbap-vbeln. but,double clicking on variable v_vbeln AS taking me to user declared VBAP
i.e., above DATA declaration statement )
Then Which one is better in Functionality wise as well as Performance wise or when we have to go for TABLES and when we have to go for DATA declaration of DDIC objects.
EX2:
what the difference between
I know that SY_REPID is not a system variable. And also that
Data: vrepid type SY_REPID.--> Predefined data type in ABAP
and
Data: vrepid like SY_REPID.-> Predefined Constatnt in ABAP( it is a constant it allowing with out VALUE
attribute)
what difference between them and when we have to go Data: vrepid type SY_REPID and when we have to go Data: vrepid like SY_REPID.
Thank U,
Shabeer Ahmed.Hi Ahmed,
TABLES:
VBAP. " DDIC
DATA:
v_vbeln like vbap-vbeln.
*Here you are using the DDIC VBAP
DATA:
VBAP TYPE VBAP.
DATA:
vbeln like vbap-vbeln.
*Here you are using the local data object as your data type so it will always
* take you to user declared VBAP which is declared by you.
DATA:
T_VBAP TYPE VBAP.
DATA:
vbeln like vbap-vbeln.
* here its using T_VBAP not DDIC VBAP
And for performance always the second option is better, use Data instead of tables, declare your own local structure.
Data:
vrepid type SY_REPID. thereis nop redefined data type in ABAP as SY_REPID
* its SY-REPID which is a system variable.
Data:
vrepid type SY-REPID.
Also refer to the links:
Difference between tables statement and by using type statement
for type and like:
Re: LIKE and Type in abap statements
With luck,
Pritam. -
What is the actual use of T180 table????
Hi Sap Gurus,
We hav an requirement that instead of using transaction codes VL01,VL01N,VL02,VL02N,VA01,VA02,, we need to use T180 table.
So what is actual use of T180?.
Why we use this table?
Thanks in advance.
Regards.....KumarHi Kumar,
Check the below details :
Actually VA22 and other transactions of SAPMV45A program fetch
the information on SET/GET parameters from table T180. See
subroutine VBAK-VBELN_GET_PARAMETER. The name of Set/get
parameter depends on T180-TRVOG field. Actually for VA22 the
parameter is AGN.
We use the T180-TRTYP field to know whether it is CHANGE or DISPLAY or Create Transaction.
If it is V it is changed .
see the other values of this field.
Only we use this particular field in the programs.
Masked
A Display
B Edit
C Display from archive
E Single-item planning
H Add
V Change
X Initial transaction
S Standard parameter: normal mode
Thanks,
Greetson -
Transaction used for maintaining condition record for contract
Hi All,
In one of the issue user is not able to print contract,we have noticed that default printer is set for user.I need to check what condition record is maintained for user.
Can anyone let me know what is the transaction used for maintaining condition record for contract output.
Regards,
DharmeshHi
MN01 Create Message: RFQ
MN04 Create Message: PO
MN07 Create Message: Outline Agreement
MN10 Create Message: Schd. Agmt. Schedul
MN13 Create Message: Service Entry Sheet
MN21 Create Condition: Inventory Mgmt
MN24 Create Message: Shipping Notif.
MN27 Create message: rough goods receipt
MN10 / MN11 - Scheduling Agreement Delivery Schedule
Vijay -
What is the main use of pooled talbe and where are they use?
Hi gus:
Can somebody tell me what is the main use of pooled table and where are they use,thanks!
Regards
Jerry
Moderator message - Please search before asking - post locked
Edited by: Rob Burbank on Sep 1, 2009 9:11 AMHi,
Table pools are special table types in the ABAP Dictionary. The data from several different tables can be stored together in a table pool or table cluster. Tables assigned to a table pool or table cluster are referred to as pooled tables or cluster tables.
This table are similar to the CLUSTER table types but these work on "LINEAR SEARCH" while CLUSTER TABLE uses "BINARY SEARCH to retrieve the data from the various tables and thsi is mainly used in the logical databases "LDB's" used in HR or ABAP-HR.
A table in the database in which all records from the pooled tables assigned to the table pool are stored corresponds to a table pool.
The definition of a pool consists essentially of two key fields (Tabname and Varkey) and a long argument field (Vardata).
Table Clusters Several logical data records from different cluster tables can be stored together in one physical
record in a table cluster.
A cluster key consists of a series of freely definable key fields and a field (Pageno) for distinguishing continuation records. A cluster also contains a long field (Vardata) that contains the contents of the data fields of the cluster tables for this key. If the data does not fit into the long field, continuation records are created. Control information on the structure of the data string is still written at the beginning of the Vardata field.
Regards,
Samad. -
With which transation can we maintain table ADR6
Hi All:
would you please tell me which t-code we can use to maintain table ADR6 .
Thank you very much.
FrankHi,
As i already mentioned in the transaction 'BP' select the bp id of the internet users, employees and enter the email id.
Then check the table adr6 with the address number of that bp.
table but020 --- to get the address number from bp id.
table adr6 == to get the email from the address number.
reward if useful ***
Regards,
Ruby. -
How to get or what tcode to use for details statistics of AIX server in sap
Dear Sir,
How I get the details of AIX Server's Statistics in SAP. I mean by which tcode I can get it. Or in Server level what command should I use .
Thanks in advance,
PranabThanks every one for their prompt reply.
I have got ans. by using the command : prtconf
Thanks once again everybody.
Thanks and Regards,
Pranab -
What are the Tcodes commanly used in ALE-IDOCs?
Hi,
What are the Tcodes commanly used in ALE-IDOCs?
Regards,
Chow.Hi,
Go through the following Tcode for ALE
ALE IDOC
Sending System(Outbound ALE Process)
Tcode SALE ? for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 ? Create Model View
Tcode BD82 ? Generate partner Profiles & Create Ports
Tcode BD64 ? Distribute the Model view
Message Type MATMAS
Tcode BD10 ? Send Material Data
Tcode WE05 ? Idoc List for watching any Errors
Receiving System(Inbound ALE )
Tcode SALE ? for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 ? Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 ? Idoc List for inbound status codes
ALE IDOC Steps
Sending System(Outbound ALE Process)
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 !V Create Model View
Tcode BD82 !V Generate partner Profiles & Create Ports
Tcode BD64 !V Distribute the Model view
This is Receiving system Settings
Receiving System(Inbound ALE )
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 !V Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 !V Idoc List for inbound status codes
Message Type MATMAS
Tcode BD10 !V Send Material Data
Tcode WE05 !V Idoc List for watching any Errors
1)a Goto Tcode SALE
Click on Sending & Receiving Systems-->Select Logical Systems
Here Define Logical Systems---> Click on Execute Button
go for new entries
1) System Name : ERP000
Description : Sending System
2) System Name : ERP800
Description : Receiving System
press Enter & Save
it will ask Request
if you want new request create new Request orpress continue for transfering the objects
B) goto Tcode SALE
Select Assign Client to Logical Systems-->Execute
000--> Double click on this
Give the following Information
Client : ERP 000
City :
Logical System
Currency
Client role
Save this Data
Step 2) For RFC Creation
Goto Tcode SM59-->Select R/3 Connects
Click on Create Button
RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
give the information for required fields
RFC Destination : ERP800
Connection type: 3
Description
Target Host : ERP000
System No:000
lan : EN
Client : 800
User : Login User Name
Password:
save this & Test it & RemortLogin
3)
Goto Tcode BD64 -- click on Change mode button
click on create moduleview
short text : xxxxxxxxxxxxxx
Technical Neme : MODEL_ALV
save this & Press ok
select your just created modelview Name :'MODEL_ALV'.
goto add message type
Model Name : MODEL_ALV
sender : ERP000
Receiver : ERP800
Message type :MATMAS
save & Press Enter
4) Goto Tcode BD82
Give Model View : MODEL_ALV
Partner system : ERP800
execute this by press F8 Button
it will gives you sending system port No :A000000015(Like)
5) Goto Tcode BD64
seelct the modelview
goto >edit>modelview-->distribute
press ok & Press enter
6)goto Tcode : BD10 for Material sending
Material : mat_001
Message Type : MATMAS
Logical System : ERP800
and Execute
7)goto Tcode : BD11 for Material Receiving
Material : mat_001
Message Type : MATMAS
and Execute --> 1 request idoc created for message type Matmas
press enter
Here Master Idoc set for Messge type MATMAS-->press Enter
1 Communication Idoc generated for Message Type
this is your IDOC
Change Pointers
I know how to change the description of a material using ALE Change Pointers.
I will give the following few steps
1) Tcode BD61---> check the change pointers activated check box
save and goback.
2) Tcode BD50---> check the MATMAS check box save and comeback.
3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
4) Tcode BD52---> give message type : matmas press ok button.
select all what ever you want and delete remaining fields.
save & come back.
5) 5) go to Tcode MM02 select one material and try to change the description and save it
it will effects the target systems material desciption will also changes
6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
give Message type : MATMAS and Executte
ALE/IDOC Status Codes/Messages
01 Error --> Idoc Added
30 Error --> Idoc ready for dispatch(ALE Service)
then goto SE38 --> Execute the Program RBDMIDOC
29 Error --> ALE Service Layer
then goto SE38 --> Execute the Program RSEOUT00
03 Error --> Data Passed to Port ok
then goto SE38 --> Execute the Program RBDMOIND
12 Error --> Dispatch ok
Inbound Status Codes
50 Error --> It will go for ALE Service Layer
56 Error --> Idoc with Errors added
51 Error --> Application Document not posted
65 Error --> Error in ALE Service Layer
for 51 or 56 Errors do the following steps
goto WE19 > give the IDOC Number and Execute>
Press on Inbound function Module
for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
Regards,
Priyanka. -
What is SM62 Tcode is used for? and the consequence's for executing it?
What is SM62 Tcode is used for? and the consequence's for executing it?
Thank you,
YorkHi Les,
You can goto this URL to understand more about events :
http://help.sap.com/saphelp_nw2004s/helpdata/en/44/c079239d3756a2e10000000a1553f6/frameset.htm
http://www.sapfans.com/sapfans/sapfaq/robert.htm
About my experience working with events:
In one of my BW Project: we were using AutoSys to do job scheduling (to run InfoPackages).
To automate the loading process we created events for each infopackage. Then in that Infopackage we used to select option "Start later in Background" and then select option "After Event". Then specified the event name and parameter.
Then in the same infopackage we selected button "Subsequent Process" the in that seelct option "Trigger Events" Here you can have options to specify if this event is successful then what next event to trigger and if this event fails what next event to trigger.
So this way we used to automate data loads.
This was dont caz there was no process chains concept during that time. So good example of events and event based process are PROCESS CHAINS.
Hope this helps !!
Assign points if helps !!
Regards,
Naveen Rao Kattela -
What is the application use controls in eCATTS?
Hi,
whats the use of TCD & SAPGUI .What type of scripts used for TCD?
and also what type of scripts used for SAPGUI.
Thanks,
RajiHi Lakshmi,
Using TCD, we can do recording for the particular transaction...
SAP CATT - Computer Aided Test Tool
Just sharing my experiences with CATT (although, I have not used this feature in the last 2 years or so !).
Simply, any one in SAP can use this tool as long as you can access to the tcode. I used CATT atleast in 3 different SAP modules. Typically, in SAP projects, CATT execution is a favorite task for "technical" associates. When the technical resources are either not available immediately or their plate is full with other important tasks, functional associates can simply jump into this activity, since there is no coding or programming involved. This tool has been a great gift from SAP since I am a functional person and could not do coding ! I can remember at least 30 or 40 occassions where I used CATT to get this and that done.
Below find few examples:
1. Created multiple sales orders (excess of 200) in a matter of minutes for the purpose of end user training
2. Created multiple purchase ordes (excess of 200) in a matter of minutes for the purpose of end user training
3. Created Deliveries for the sales orders in a matter of minutes for the purpose of end user training
4. Created config. entires, if the volume of records is large. I remember once I entered 900 records.
5. Extensively used in preparing the transactional data for the purpose of archiving. It worked impeccably.
6. Loading of master data (example: material groups)
Note: Upon execution of CATT, it is very possible that some records will fail, which have to be addressed manually. SAP really needs to further enhance this area of CATT because, there is no easy way of identifying the failed ones, it has to be done manually. One workaround is simply download the result into an Excel and using sort feature of Excel, identify the failed ones and deal with them manually.
With Compliment by: Ranga Rachapudi
CATT stands 4 Computer Aided Testing Tool
Although CATT is meant for as a testing tools, many SAP users have now use CATT frequently to upload vendors master data and make changes to other master record.
SAP Consultant and Abapers tends to used it for creating test data.
With CATT, you don't have to create any ABAP upload programs and this save on development time. However, you still have to spend time on data mapping into the spreadsheet format.
The transactions run without user interaction. You can check system messages and test database changes. All tests are logged.
What CATT does is record you performing the actual transaction once.
You then identify the fields that you wish to change in that view.
Then export this data to a spreadsheet to populate with the data required.
This is uploaded and executed saving you keying in the data manually.
To perform CATT, it has to be enabled in your production environment (your systems administrator should be able to do this - SCC4).
You will also need access to your development system to create the CATT script.
With Compliment by: Vijay
User Guide for Data Upload
The use of CATT is for bulk uploading of data. Although CATT is primarily a testing tool, it can be used for the mass upload of data. The way CATT works is like a real user actually inputting on the SAP screen. You prepare a set of data that are required to be input into the system and execute what you called a Test Case and CATT will do the boring task of keying for you.
Over-all procedure
The over-all procedure to upload data using CATT is as follows:
· Creation of the CATT test case & recording the sample data input.
· Download of the source file template.
· Modification of the source file.
· Upload of the data from the source file.
Details of each step are provided in the following paragraphs.
Detailed Procedure
Creation of the CATT test case:
Creation of the test case is completed as follows:
· Execute Transaction SCAT
· Name the test case. Test case name must start with Z. It is also good practise to include the transaction code in
the test case name (e.g. Z_IE01_UPLOAD for the upload of equipment)
· Click the Record button.
· Enter the transaction code (e.g. IE01)
· Continue recording the transaction. Ensure data is entered into every field that is to be used during the upload.
· Save the test case.
Download the source file template
Download of source file template is conducted in two stages as follows:
· Creation of import parameters:
· Within transaction SCAT, Double Click on the TCD line in the Maintain Functions screen.
· Click the Field List button (Field list is displayed).
· For every field that you wish to upload data, double click in the Column New field contents (This creates an
import parameter).
· In the Maintain Import Parameter Pop-Up:
· Delete the default value if not required.
· Press Enter
· The New field contents column now contains the character & followed by the field name (e.g. &EQART). This
is the name of the import parameter.
· Repeat this for every field (in every screen) to be uploaded.
· Back out and save the CATT test case
· Download of source file template:
· Use the path GOTO -> Variants -> Export Default
· Select path and file name (e.g. C:TEMPZ_IE01_UPLOAD.TXT)
· Click Transfer
Modify the source file
The downloaded source file template is now populated with the data that is to be uploaded. This is completed as follows:
· Using Excel, open the tab-delimited text file.
· Do not change any of the entries that already exist.
1st row contains the field names.
2nd row contains the field descriptions.
3rd row displays the default values which are set in the test case.
4th row contains a warning that changing the default values in the spreadsheet has no effect on the actual default values.
· The data to be uploaded can be entered in the spreadsheet from row 4 onwards (delete the 4th row warning &
replace with data for upload).
· Save the file as a Text file (Tab delimited).
Upload data from the source file
Uploading the data is completed as follows:
· Execute the CATT test case
· In the Execute screen:
· Set processing mode to Errors or Background (your choice).
· Set variants to External from file.
· Click the Choose button and select the file to be uploaded.
· If uploading to another client, click the Remote execution button and select the RFC connection to the required client.
· If uploading to the current client, click the execute button.
Also, refer the links....
http://www.sap-img.com/sap-catt.htm
http://sap.ittoolbox.com/documents/popular-q-and-a/catt-procedure-1795
http://www.thespot4sap.com/Articles/CATT.asp
Award points if useful -
Customizing where is used Table T158
Dear guru ,
i was searching in the menu of customizing where is used the table T158.
Do you help me ?
Thanks.make sure the inventory management parameters are maintained in tcode OLMB
and if still problem persist then give us the error to play with -
What is vendor performance report what are the fields using in the report
What is vendor performance report what are the fields using in the report and i need some sample reports for that particular topic (clasical report)not using any alvs or any advance topics.
U R Satish Patnaikhi
good
*"Table declarations...................................................
TABLES:
EKKO, " Purchasing Document Header
CDHDR, " Change document header
SSCRFIELDS. " Fields on selection screens
*"Selection screen elements............................................
SELECT-OPTIONS:
S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
S_EKGRP FOR EKKO-EKGRP, " Purchasing group
S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
S_UDATE FOR CDHDR-UDATE. " Creation date of the change
" document
*" Data declarations...................................................
Field String to hold Purchase Document Number *
DATA:
BEGIN OF FS_EBELN,
EBELN(90) TYPE C, " Purchase Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
" the Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EBELN,
Field String to hold Purchase Document Header *
BEGIN OF FS_EKKO,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EKKO,
Field String to hold Account Number and name of the Vendor *
BEGIN OF FS_LFA1,
LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
NAME1 TYPE LFA1-NAME1, " Name1
END OF FS_LFA1,
Field String to hold Change date and the name of the user *
BEGIN OF FS_CDHDR,
OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
OBJECTID TYPE CDHDR-OBJECTID, " Object value
CHANGENR TYPE CDHDR-CHANGENR, " Document change number
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
END OF FS_CDHDR,
Field String to hold Change document items *
BEGIN OF FS_CDPOS,
OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
OBJECTID(10) TYPE C, " Object Value
CHANGENR TYPE CDPOS-CHANGENR, " Document change number
TABNAME TYPE CDPOS-TABNAME, " Table Name
FNAME TYPE CDPOS-FNAME, " Field Name
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_CDPOS,
Field String to hold Date Element Name *
BEGIN OF FS_DATAELE,
TABNAME TYPE DD03L-TABNAME, " Table Name
FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
END OF FS_DATAELE,
Field String to hold Short Text of the Date Element *
BEGIN OF FS_TEXT,
ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
END OF FS_TEXT,
Field String to hold data to be displayed on the ALV grid *
BEGIN OF FS_OUTTAB,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
WERKS TYPE LFA1-WERKS, " Plant
NAME1 TYPE LFA1-NAME1, " Name1
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_OUTTAB,
Internal table to hold Purchase Document Number *
T_EBELN LIKE STANDARD TABLE
OF FS_EBELN,
Internal table to hold Purchase Document Header *
T_EKKO LIKE STANDARD TABLE
OF FS_EKKO,
Temp Internal table to hold Purchase Document Header *
T_EKKO_TEMP LIKE STANDARD TABLE
OF FS_EKKO,
Internal table to hold Account number and Name of the Vendor *
T_LFA1 LIKE STANDARD TABLE
OF FS_LFA1,
Internal Table to hold Change date and the name of the user *
T_CDHDR LIKE STANDARD TABLE
OF FS_CDHDR,
Internal Table to hold Change document items *
T_CDPOS LIKE STANDARD TABLE
OF FS_CDPOS,
Temp. Internal Table to hold Change document items *
T_CDPOS_TEMP LIKE STANDARD TABLE
OF FS_CDPOS,
Internal Table to hold Data Element Name *
T_DATAELE LIKE STANDARD TABLE
OF FS_DATAELE,
Temp. Internal Table to hold Data Element Name *
T_DATAELE_TEMP LIKE STANDARD TABLE
OF FS_DATAELE,
Internal Table to hold Short Text of the Date Element *
T_TEXT LIKE STANDARD TABLE
OF FS_TEXT,
Internal Table to hold data to be displayed on the ALV grid *
T_OUTTAB LIKE STANDARD TABLE
OF FS_OUTTAB.
C L A S S D E F I N I T I O N *
CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
*" Data declarations...................................................
Work variables *
DATA:
W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
W_VALUE TYPE EKKO-EBELN, " Reflected Value
W_SPACE VALUE ' ', " Space
W_FLAG TYPE I, " Flag Variable
W_VARIANT TYPE DISVARIANT, " Variant
*--- ALV Grid
W_GRID TYPE REF TO CL_GUI_ALV_GRID,
*--- Event Handler
W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
*--- Field catalog table
T_FIELDCAT TYPE LVC_T_FCAT.
AT SELECTION-SCREEN EVENT *
AT SELECTION-SCREEN ON S_EBELN.
Subroutine to validate Purchase Document Number.
PERFORM VALIDATE_PD_NUM.
AT SELECTION-SCREEN ON S_LIFNR.
Subroutine to validate Vendor Number.
PERFORM VALIDATE_VEN_NUM.
AT SELECTION-SCREEN ON S_EKGRP.
Subroutine to validate Purchase Group.
PERFORM VALIDATE_PUR_GRP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
Subroutine to select all Purchase orders.
PERFORM SELECT_PO.
CHECK W_FLAG EQ 0.
Subroutine to select Object values.
PERFORM SELECT_OBJ_ID.
CHECK W_FLAG EQ 0.
Subroutine to select Changed values.
PERFORM SELECT_CHANGED_VALUE.
CHECK W_FLAG EQ 0.
Subroutine to Select Purchase Orders.
PERFORM SELECT_PUR_DOC.
Subroutine to select Vendor Details.
PERFORM SELECT_VENDOR.
Subroutine to select Text for the Changed values.
PERFORM DESCRIPTION.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
IF NOT T_EKKO IS INITIAL.
Subroutine to populate the Output Table.
PERFORM FILL_OUTTAB.
Subroutine to build Field Catalog.
PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
CALL SCREEN 100.
ENDIF. " IF NOT T_EKKO...
CLASS LCL_EVENT_HANDLER DEFINITION
Defining Class which handles events
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID.
ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION
Implementing the Class which can handle events
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
*---Handle Double Click
METHOD HANDLE_HOTSPOT_CLICK .
Subroutine to get the HotSpot Cell information.
PERFORM GET_CELL_INFO.
SET PARAMETER ID 'BES' FIELD W_VALUE.
CALL TRANSACTION 'ME23N'.
ENDMETHOD. " HANDLE_HOTSPOT_CLICK
ENDCLASS. " LCL_EVENT_HANDLER
*& Module STATUS_0100 OUTPUT
PBO Event
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'OOPS'.
SET TITLEBAR 'TIT'.
Subroutine to fill the Variant Structure
PERFORM FILL_VARIANT.
IF W_GRID IS INITIAL.
CREATE OBJECT W_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CL_GUI_CONTAINER=>SCREEN0
I_APPL_EVENTS =
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT = W_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = T_OUTTAB
IT_FIELDCATALOG = T_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF W_GRID IS INITIAL
CREATE OBJECT W_EVENT_CLICK.
SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
PAI Event
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form PREPARE_FIELD_CATALOG
Subroutine to build the Field catalog
<--P_T_FIELDCAT Field Catalog Table
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT.
Purchasing group...
LS_FCAT-FIELDNAME = 'EKGRP'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Number...
LS_FCAT-FIELDNAME = 'EBELN'.
LS_FCAT-REF_TABLE = 'EKKO' .
LS_FCAT-EMPHASIZE = 'C411'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-HOTSPOT = 'X'.
APPEND LS_FCAT TO PT_FIELDCAT .
CLEAR LS_FCAT .
Name of Person who Created the Object...
LS_FCAT-FIELDNAME = 'ERNAM'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-OUTPUTLEN = '15' .
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Date...
LS_FCAT-FIELDNAME = 'BEDAT'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Vendor's account number...
LS_FCAT-FIELDNAME = 'LIFNR'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Account Number of Vendor or Creditor...
LS_FCAT-FIELDNAME = 'NAME1'.
LS_FCAT-REF_TABLE = 'LFA1'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Vendor Name'(001).
LS_FCAT-SELTEXT = 'Vendor Name'(001).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Creation date of the change document...
LS_FCAT-FIELDNAME = 'UDATE'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Change Date'(002).
LS_FCAT-SELTEXT = 'Change Date'(002).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
User name of the person responsible in change document...
LS_FCAT-FIELDNAME = 'USERNAME'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Modified by'(003).
LS_FCAT-SELTEXT = 'Modified by'(003).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Short Text Describing R/3 Repository Objects...
LS_FCAT-FIELDNAME = 'DDTEXT'.
LS_FCAT-REF_TABLE = 'DD04T'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '15'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Old contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_OLD'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
New contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_NEW'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form SELECT_PO
Subroutine to select all the Purchase Orders
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PO .
SELECT EBELN " Purchasing Document Number
ERNAM " Name of Person who Created
" the Object
LIFNR " Vendor's account number
EKGRP " Purchasing group
BEDAT " Purchasing Document Date
FROM EKKO
PACKAGE SIZE 10000
APPENDING TABLE T_EBELN
WHERE EBELN IN S_EBELN
AND BEDAT IN S_BEDAT.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S401(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDFORM. " SELECT_PO
*& Form SELECT_OBJ_ID
Subroutine to select Object ID
There are no interface parameters to be passed to this subroutine.
FORM SELECT_OBJ_ID .
IF NOT T_EBELN IS INITIAL.
SELECT OBJECTCLAS " Object Class
OBJECTID " Object value
CHANGENR " Document change number
USERNAME " User name
UDATE " Creation date
FROM CDHDR
INTO TABLE T_CDHDR
FOR ALL ENTRIES IN T_EBELN
WHERE OBJECTID EQ T_EBELN-EBELN
AND UDATE IN S_UDATE
AND TCODE IN ('ME21N','ME22N','ME23N').
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Header Not Found'(031).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EBELN IS INITIAL
ENDFORM. " SELECT_OBJ_ID
*& Form SELECT_CHANGED_VALUE
Subroutine to select Changed Values
There are no interface parameters to be passed to this subroutine.
FORM SELECT_CHANGED_VALUE .
IF NOT T_CDHDR IS INITIAL.
SELECT OBJECTCLAS " Object class
OBJECTID " Object value
CHANGENR " Document change number
TABNAME " Table Name
FNAME " Field Name
VALUE_NEW " New contents of changed field
VALUE_OLD " Old contents of changed field
FROM CDPOS
PACKAGE SIZE 10000
APPENDING TABLE T_CDPOS
FOR ALL ENTRIES IN T_CDHDR
WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
AND OBJECTID EQ T_CDHDR-OBJECTID
AND CHANGENR EQ T_CDHDR-CHANGENR.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Item Not Found'(032).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_CDHDR IS INITIAL
T_CDPOS_TEMP[] = T_CDPOS[].
ENDFORM. " SELECT_CHANGED_VALUE
*& Form SELECT_PUR_DOC
Subroutine to select Purchase Order Details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PUR_DOC .
IF NOT T_CDPOS IS INITIAL.
SORT T_EBELN BY EBELN.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
FS_CDPOS-OBJECTID BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE TABLE T_EBELN FROM FS_EBELN.
ENDIF. " IF SY-SUBRC NE 0.
ENDLOOP. " LOOP AT T_CDPOS...
LOOP AT T_EBELN INTO FS_EBELN.
MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
APPEND FS_EKKO TO T_EKKO.
ENDLOOP. " LOOP AT T_EBELN...
T_EKKO_TEMP[] = T_EKKO[].
ENDIF. " IF NOT T_CDPOS IS INITIAL
ENDFORM. " SELECT_PUR_DOC
*& Form SELECT_VENDOR
Subroutine to select Vendor details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_VENDOR .
IF NOT T_EKKO IS INITIAL.
SORT T_EKKO_TEMP BY LIFNR.
DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
SELECT LIFNR " Account Number of Vendor or
" Creditor
NAME1 " Name 1
FROM LFA1
INTO TABLE T_LFA1
FOR ALL ENTRIES IN T_EKKO_TEMP
WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
IF SY-SUBRC NE 0.
MESSAGE S002(M8) WITH 'Master Details'(033).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EKKO IS INITIAL
ENDFORM. " SELECT_VENDOR
*& Form DESCRIPTION
Subroutine to get the description
There are no interface parameters to be passed to this subroutine.
FORM DESCRIPTION .
IF NOT T_CDPOS IS INITIAL.
SORT T_CDPOS_TEMP BY TABNAME FNAME.
DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
SELECT TABNAME " Table Name
FIELDNAME " Field Name
ROLLNAME " Data element
FROM DD03L
INTO TABLE T_DATAELE
FOR ALL ENTRIES IN T_CDPOS_TEMP
WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
IF NOT T_DATAELE IS INITIAL.
T_DATAELE_TEMP[] = T_DATAELE[].
SORT T_DATAELE_TEMP BY ROLLNAME.
DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
SELECT ROLLNAME " Data element
DDTEXT " Short Text Describing R/3
" Repository Objects
FROM DD04T
INTO TABLE T_TEXT
FOR ALL ENTRIES IN T_DATAELE_TEMP
WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
AND DDLANGUAGE EQ SY-LANGU.
IF SY-SUBRC NE 0.
EXIT.
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_DATAELE IS INITIAL.
ENDIF. " IF NOT T_CDPOS IS INITIAL.
ENDFORM. " DESCRIPTION
*& Form FILL_OUTTAB
Subroutine to populate the Outtab
There are no interface parameters to be passed to this subroutine.
FORM FILL_OUTTAB .
SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
SORT T_EKKO BY EBELN.
SORT T_LFA1 BY LIFNR.
SORT T_DATAELE BY TABNAME FIELDNAME.
SORT T_TEXT BY ROLLNAME.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
OBJECTCLAS = FS_CDPOS-OBJECTCLAS
OBJECTID = FS_CDPOS-OBJECTID
CHANGENR = FS_CDPOS-CHANGENR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
READ TABLE T_EKKO INTO FS_EKKO WITH KEY
EBELN = FS_CDHDR-OBJECTID
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
LIFNR = FS_EKKO-LIFNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
TABNAME = FS_CDPOS-TABNAME
FIELDNAME = FS_CDPOS-FNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
READ TABLE T_TEXT INTO FS_TEXT WITH KEY
ROLLNAME = FS_DATAELE-ROLLNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
APPEND FS_OUTTAB TO T_OUTTAB.
CLEAR FS_OUTTAB.
ENDLOOP.
ENDFORM. " FILL_OUTTAB
*& Form GET_CELL_INFO
Subroutine to get the Cell Information
--> W_VALUE Holds the value of Hotspot clicked
FORM GET_CELL_INFO .
CALL METHOD W_GRID->GET_CURRENT_CELL
IMPORTING
E_ROW =
E_VALUE = W_VALUE
E_COL =
ES_ROW_ID =
ES_COL_ID =
ES_ROW_NO =
ENDFORM. " GET_CELL_INFO
*& Form VALIDATE_PD_NUM
Subroutine to validate Purchase Document Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PD_NUM .
IF NOT S_EBELN[] IS INITIAL.
SELECT EBELN " Purchase Document Number
FROM EKKO
INTO W_EBELN
UP TO 1 ROWS
WHERE EBELN IN S_EBELN.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E717(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EBELN[]...
ENDFORM. " VALIDATE_PD_NUM
*& Form VALIDATE_VEN_NUM
Subroutine to validate Vendor Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_VEN_NUM .
IF NOT S_LIFNR[] IS INITIAL.
SELECT LIFNR " Vendor Number
FROM LFA1
INTO W_LIFNR
UP TO 1 ROWS
WHERE LIFNR IN S_LIFNR.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E002(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_LIFNR[]...
ENDFORM. " VALIDATE_VEN_NUM
*& Form VALIDATE_PUR_GRP
Subroutine to validate the Purchase Group
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PUR_GRP .
IF NOT S_EKGRP[] IS INITIAL.
SELECT EKGRP " Purchase Group
FROM T024
INTO W_EKGRP
UP TO 1 ROWS
WHERE EKGRP IN S_EKGRP.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E622(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EKFRP[]...
ENDFORM. " VALIDATE_PUR_GRP
*& Form FILL_VARIANT
Subroutine to fill the Variant Structure
There are no interface parameters to be passed to this subroutine
FORM FILL_VARIANT .
Filling the Variant structure
W_VARIANT-REPORT = SY-REPID.
W_VARIANT-USERNAME = SY-UNAME.
ENDFORM. " FILL_VARIANT
reward point if helpful.
thanks
mrutyun^ -
What are the settings required to maintain consignment storgae location
Hi, what are the setting required to maintain new consignmnet storgae location for a customer.
Thank you.Here I am giving you over all idea of Consignment:
Consignment goods are goods which are stored at the customer location but which are owned by your company. The customer is not obliged to pay for these goods until they remove them from consignment stock. Otherwise, the customer can usually return consignment goods which are not required.
Consignment processing offers the participating partners several advantages. Customers store the consignment goods at their own warehouses. The customer can access the goods in the consignment warehouse at any time. They are only billed for the goods when they are removed from the warehouse and only for the actual quantity taken.
consignment stock must be
Managed separately from the rest of your stock so that you know exactly what stock is stored at the customer location
Managed separately for each customer
In inventory management, the consignment stock is managed as special stock in your inventory and is assigned to specific customers. This enables you to keep track of returnable packaging stock by customer.
If the consignment stocks are not managed by the sold-to party but by a central office, you can use the partner function for special stock partner.
Prerequisites
Special Stock Partner
The special stock partner has been defined for carrying out consignment stock processing by means of a third party rather than the customer. This means you can manage all special stock under one partner. It makes sense to use the special stock partner if your customer is using decentralized order processing but manages consignment stock centrally.
Inventory Management Using the Special Stock Partner
If you want to process your consignment goods using a special stock partner, proceed as follows:
Create a customer master record for the special stock partner (account groups 0001 and DEBI are defined for this purpose in the standard system).
Enter the special stock partner in the relevant customer master record on the partner screen using the partner function SB.
When you create an order for this customer, the system automatically proposes the partner function SB in the document header and the document items. Consignment goods which have been entered in a consignment fill-up are always posted to the stock of the special stock partner when goods issue is carried out. You can also enter the partner function SB manually in the document header or in the relevant items if a special stock partner is required and is not proposed from the customer master record. If a special stock partner does not exist in the document header, inventory management is carried out using the sold-to party.
Process Flow
There are four main transactions for processing consignment stock in the R/3 System, all of which support separate management of stock:
Creating a Consignment Fill-Up
Creating Consignment Issue
Creating a Consignment Pick-Up
Displaying Consignment Returns
Consignment fill-up
Consignment fill up is used to supplement the customers consignment stock.
Goods issue of the appropriate stock is posted from the unrestricted-use stock to consignment stock (special stock). The goods remain in the possession of the vendor.
When you ship consignment stock to the customer, you record the transaction by creating a consignment fill-up order (order type KB). As a result, the system carries out the following actions:
If special stock does not yet exist in your inventory for the customer (or special stock partner), the system creates it when goods issue is posted
The relevant quantity is removed from regular inventory in your plant and is added to the special stock for the customer. The total valuated stock for the plant remains the same.
The transaction is not relevant for pricing since the consignment stock remains the property of your company.
Consignment pick-up
Consignment issue enables the customer to take consignment goods from the special stock for their use or to sell.
Consignment issue involves removing the goods from the special stock and making it the property of the customer.
When the customer removes consignment stock to use or sell, you record the transaction in the system by creating a consignment issue order (order type KE). As a result, the system carries out the following actions:
When goods issue is posted, the relevant quantity is deducted from both the customers special stock and your own total valuated stock.
The transaction is relevant for pricing since the goods now become the property of the customer.
Consignment issue
Any consignment goods stored at the customers warehouse that havent been used can be reposted to your companys warehouse with a consignment pick-up.
If the customer returns consignment stock to you, you record the transaction in the system by creating a consignment pick-up order (order type KA). As a result, the system carries out the following actions:
When goods issue is posted, the relevant quantity is deducted from the customers special stock and is added back into your regular stock at the plant where the goods are returned. Your total valuated stock remains the same since the returned stock was regarded as part of your own inventory even while it was at the customers premises.
This transaction is not relevant for billing.
Consignment return
Consignment returns are used for when your customer wants to return goods to the consignment stock.
If the customer wishes to claim on consignment goods which have already been issued, you can record this transaction by creating a consignment return order (order type KR). As a result, the system carries out the following actions:
When goods issue is posted, the relevant quantity is added to the customers special stock at the plant where the goods are returned
Since the ownership of the goods is passed from the customer back to your company, the transaction is relevant for billing. In this case, the customer receives a credit memo for the returned goods.
Depending on the settings in Customizing for Sales, you can create consignment returns with direct reference to a consignment issue. The consignment issue appears in the document flow for the consignment return. This function is not supported in the standard version of the SAP R/3 System.
When you create consignment returns in the standard version of the SAP R/3 System, the system automatically sets a billing block. To credit a return, you must first approve the request for a credit memo by removing the billing block in the return header. You can control the automatic setting of a billing block in Customizing for Sales.
The following table provides an overview of the order types used in the standard system for processing consignments:
Transaction
Sales order type
Consignment fill-up
KB
Consignment issue
KE
Consignment pick-up
KA
Consignment return
KR
Pricing and Availability Check
Whether pricing is carried out for the individual transactions depends on the item category. The schedule line category controls the availability check and the transfer of requirements in each of the transactions. The schedule line category itself is determined by the item category and the MRP type of the material. The order types KE and KA check against the consignment stock for the customer involved and order type KB checks against your own plant stock. Requirement records for consignment stock are stored as individual requirements, independently of the setting in the material master
Maybe you are looking for
-
I just received my new iPad Air. I had understood that it came with several apps including: Pages, Numbers and Keynote, but it doesn't seem to be the case. Did I misunderstand the promos? I use a Dell XPS desktop running Windows 7.
-
Why doesn't my Photoshop Elements 12 launch/open?
No matter how I try to activate PSE12, through the desktop shortcut, through program files, through old photoshop works I've saved, it will not start. I've tried reinstalling it, but it still won't launch. What's strange to me is that Premier Element
-
Hi, I have recently bought a new apple tv (october 2013) partly for airplay (mirror) with my macbook pro. Since the 6.0 version when i use my macbook i have some video lag.. I updated to the 6.0.1 and since.... it's worst ! I need your help i'm becom
-
Windows 8 - Ipod touch fails to start ITunes when plugged in ?
When I plug in my Ipod touch ITunes fails to start even though it is enabled in my IPod touch settings. It used to always load up Itunes in Windows 7 but I can't figure out what the problem is. Any ideas ?
-
Can't Import (or find) Swing
G'day Any help would be appreciated. I've looked all over Sun's docs, tutorials, etc., and haven't been able to find the answer to this. Environment: O/S: Red Hat 9 Linux Java : j2sdk1.4.2_03 A minimal dialog box application, which starts out like th