Whats the link between Migo ( Material Doc no ) & resp Accounting doc no
In order to generate one development in MM. I need to know Link between Material Doc number ( MIGO ) transaction & Accounting document generated for that particular Material doc number which we browse thru Follow on Doc.
In case the Number range for both is same the solution is easy but we have No ranges for both these are different.
Can experts help me to identify link at Table / Field level which is critical for our Abap Development.
Regards
Umesh Bagul
Hi Umesh,
The link between the Material document & Accounting document is Movement type.
Goods movement such as Goods receipt /Goods Issue /Stock transfer is always based on the type of " Movement type " which we are using and 2ndly the type of material that we are procuring and receiving or issuing or posting the goods movements. Because based on the Material only the properties of material depends. For eg. for Raw material stock updation is possible for Quantity & also for Value. That means whenever you receive the goods of Raw material agains the external vendor (these goods are received against the PO with r.to. 101 Mvt type), then both Quantity updated (for this Evidence is Material document) and Value is also gets updated (for this Evidence is Accounting document), when you receive the whole stock into Unrestricted use stock /storage location.
Note:: The movement type is linked with Value string: 101 - Stock updation - by Quantity - by Value - Stock indicator - account modifier with the help of Valuation class - A/c category reference - Material type.
For example: If its receiving of goods against PO is through MIGO using 101 Mvt type.
and also
Simply can say that, Movement type plays the majour role in every goods movements and further that shows with the evidnece of material document and subsequent accounting document depending upon the movement type. And this is the link between the Material document and accounting document.
Hope that clarifies you,
Regards,
Sapsrin
Similar Messages
-
Whats the link between Pur. Tables and KONH & KONP tables
Hi!
Whats the link between Pur. Tables i.e EKKO EKPO etc and KONH & KONP tables?
and
Link B'tween KONH, KONP & EINA, EINE Tables?
and
Link b'tween the LFA1 Table and EINA, EINE Tables?
Link b'tween the LFA1 Table and KONH, KONP Tables?
Pls reply guys
Thanks,
Imran.Hi Imran,
EKKO gives you the Header data of the purchasing documents (Vendor , Dates, Etc)
EKPO gives the item Data (The materials ordered, Qty of each material etc)
KONP & KONH store the condition records used for price calculation
KONH is the header data
KONP is the item data
EINA & EINE -> These are Purchasing info records Used in source of supply determination & price calculations , the Condition record number for pricing is obtained from EINA & EINE
EINA is for Purchase org level data
EINE is for vendor level data
The link to LFA1 is the vendor master data & while picking up the price you can have different price for different vendor .
Hope you find it useful.
Kindly reward helpful answers
Best regards,
gaurav -
How to remove the link between Profile name and corp net account after their disassociation
Hi there,
How do I remove the link between Profile name and corp net account after their disassociation ?
I would like to make remove the link between 'Viv Lingaiah' and
[email protected] Also, I would like to keep 'Viv Lingaiah' and associate with my outlook id and corpnet account.Logon to your live account here
https://account.live.com/summarypage.aspx then under aliases you can add an alias and promote it to primary.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
What is the link between schedule lines and delivery document item level
Can any one please explain me what is the link between the schedule lines of the order/scheduling agreement and the item level of the delivery.
Is there any link between VBEP and LIPS ?Hi
Most of the item level data in delivery doc is copied from Schedlue lines in Sales order for eg delivery date
So u may say that schedule line in sales order becomes the line item in Subsequent doc that is in Delivery doc .
The table u are talking about i.e VBEP is related to sales doc and it contain data for Schedule line in sales order and the other table i.e LIPS give the delivry doc related data at item level.
Hope this help -
HI,
what is the link between 2lis_03_bf,2lis_03_bx and 2lis_03_uM.is these datasources to be loaded in the order.can anybody explain meHi
These three datasources are related to inventory. BF is for opening stock, BX is for material movements and UM is valuations. Before loading this data into BW you need to maintain some settings in R/3 side.
According to SAP NOTE:315880.T-code BF11.Activate the flag NDI will reflect in table "TBE11" For the entry "NDI".
2. set the application indicator 'BW' to active using Transaction 'BF11' . which will make tick mark(x) for the field AKTIV for the APPLK ='BW' in table TBE11.
3. Activate the PROCESSKEY under "Maintain Industry Sector"
4. Generated "STOCK INITIALIZATION" for 2LIS_03_BX.
5. Filled setup tables for "INVENTORY CONTROLLING"
6. Scheduled the InfoPackage for 2LIS_03_BX with update mode "GENERATE INITIAL STATUS.
then load BF and UM
There is a PDF available how to load inventory..just search for it in SDN.
REgards
Ram -
What is the link between "sood" and "ebelen" ( in me22n ) ?
in me22n there is an option to attach doc ,
what is the link between the order and the doc ?
i done st05 and found "sood" sofd"
also by answer here fm : SO_USER_READ_API1
but didnt find the link between the order "eblen" and the attach doc .
thanksy u are finding out link b/w EBLEN and Doc ? these tables are related to SAP office.
SOOD = SAPoffice: Object definition
SOFD = SAPoffice: Object Definition
Regards
Prabhu -
What is the link between PO and Requisition in database side
hello friends,
please can any one tell me that what is the link between PO and Requisition in database side. means after creating the requisition we will go for create the PO based on that requisition.
want to know that what is the link between both in database side.
Thanks in advance
krish.Hi,
The link is at distribution level, between:
PO_DISTRIBUTIONS_ALL.REQ_DISTRIBUTION_ID
and
PO_REQ_DISTRIBUTIONS_ALL.DISTRIBUTION_ID
Hope it helps. -
we hav requirement where we need to join these tables.
can anybody tell ,What is the link between tables PA_PROJECTS_ALL and PA_PROJECT_ACCUM_ACTUALSThis looks like an Oracle Financials question.
I don't think anyone here can answer that.
You need to look for a Financials or E-business forum.
Sybrand Bakker
Senior Oracle DBA -
What is the link between likp,mseg,bkpf tables
hi,
i got to work with tables likp,bseg,bkpf,mseg tables. can any one help me telling the link between these tables..like how these tables are interrelated..thank you..Hi Bhaskar,
I know some information only.
First give likp-vbeln to lips and get lips-matnr, lips-werks,lips-charg. give these 3 values to mseg for getting the mblnr.
Thanks,
suma. -
Whats the dfference between IDOC, ALE and EDI?
whats the dfference between IDOC, ALE and EDI?
Hi,
1)EDI
Electronic Data Interchange
Cross-company exchange of electronic data (for example business documents) between domestic and international business partners who use a variety of hardware, software, and communication services. The data involved is formatted according to predefined standards. In addition to this, SAP ALE technology is available for data exchange within a company.
Refer
http://www.erpgenie.com/sapedi/index.htm
2) ALE
A means of creating and operating distributed applications.
Application Link Enabling (ALE) guarantees a distributed, but integrated, R/3 installation. This involves business-controlled message exchange using consistent data across loosely linked SAP applications.
Applications are integrated using synchronous and asynchronous communication - not by using a central database.
ALE consists of the following layers:
Application services
Distribution services
Communication services
Refer
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
Check this link ALE and EDI
http://www.onestopsap.com/interview-Question/edi/
IDocs act as data containers in an ALE scenario. They are just a format of storing application data and then transferred using ALE. Take a look at this for further details on ALE.
http://www.sapgenie.com/ale/why_ale.htm and http://www.sapgenie.com/sapgenie/docs/ale_whitepaper.doc
Check this link.
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.henrikfrank.dk/abapexamples/IDOC/IDOC.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://help.sap.com/saphelp_47x200/helpdata/en/0b/2a6095507d11d18ee90000e8366fc2/frameset.htm
Regards,
Priyanka. -
Whats the difference between ALL and FIRST in Multi Inserting
SQL> Drop Table Sales;
Table dropped.
SQL> Drop Table Accounts;
Table dropped.
SQL> Drop Table Research;
Table dropped.
SQL> Create Table Sales As Select * From Emp;
Table created.
SQL> Create Table Accounts As Select * From Emp;
Table created.
SQL> Create Table Research As Select * From Emp;
Table created.
SQL> Truncate Table Sales;
Table truncated.
SQL> Truncate Table Accounts;
Table truncated.
SQL> Truncate Table Research;
Table truncated.
SQL> Select * From Sales;
no rows selected
SQL> Select * From Accounts;
no rows selected
SQL> Select * From Research;
no rows selected
SQL> Insert All
2 When Deptno=10 Then
3 Into Sales (Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,DeptNo)
4 When Deptno=20 Then
5 Into Accounts (Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,DeptNo)
6 When Deptno=30 Then
7 Into Research (Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,DeptNo)
8 Select * From Emp
9 .
SQL> /
16 rows created.
SQL> Select * From Sales;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 09-JUN-81 100 10
7839 KING PRESIDENT 17-NOV-81 100 10
7934 MILLER CLERK 7782 23-JAN-82 100 10
7999 ABCDEFGH JOB 7839 09-FEB-06 100 0 10
4 rows selected.
SQL> Select * From Accounts;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7901 SMITH CLERK 7902 17-DEC-80 100 20
7566 JONES MANAGER 7839 02-APR-81 100 20
7788 SCOTT ANALYST 7566 19-APR-87 100 20
7876 ADAMS CLERK 7788 23-MAY-87 100 20
7902 FORD ANALYST 7566 03-DEC-81 100 20
123 20
6 rows selected.
SQL> Select * From Research;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7499 ALLEN SALESMAN 7698 20-FEB-81 100 300 30
7521 WARD SALESMAN 7698 22-FEB-81 100 500 30
7654 MARTIN SALESMAN 7698 28-SEP-81 100 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 100 30
7844 TURNER SALESMAN 7698 08-SEP-81 100 0 30
7900 JAMES MANAGER 7698 03-DEC-81 100 30
6 rows selected.
SQL> Truncate Table Sales;
Table truncated.
SQL> Truncate Table Accounts;
Table truncated.
SQL> Truncate Table Research;
Table truncated.
SQL> Insert First
2 When Deptno=10 Then
3 Into Sales (Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,DeptNo)
4 When Deptno=20 Then
5 Into Accounts (Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,DeptNo)
6 When Deptno=30 Then
7 Into Research (Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,DeptNo)
8 Select * From Emp
9 /
16 rows created.
SQL> Select * From Sales;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 09-JUN-81 100 10
7839 KING PRESIDENT 17-NOV-81 100 10
7934 MILLER CLERK 7782 23-JAN-82 100 10
7999 ABCDEFGH JOB 7839 09-FEB-06 100 0 10
4 rows selected.
SQL> Select * From Accounts;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7901 SMITH CLERK 7902 17-DEC-80 100 20
7566 JONES MANAGER 7839 02-APR-81 100 20
7788 SCOTT ANALYST 7566 19-APR-87 100 20
7876 ADAMS CLERK 7788 23-MAY-87 100 20
7902 FORD ANALYST 7566 03-DEC-81 100 20
123 20
6 rows selected.
SQL> Select * From Research;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7499 ALLEN SALESMAN 7698 20-FEB-81 100 300 30
7521 WARD SALESMAN 7698 22-FEB-81 100 500 30
7654 MARTIN SALESMAN 7698 28-SEP-81 100 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 100 30
7844 TURNER SALESMAN 7698 08-SEP-81 100 0 30
7900 JAMES MANAGER 7698 03-DEC-81 100 30
6 rows selected.Both inserting insert the same records then whats the difference between ALL and FIRST clause in multi insert DML
Khurram Siddiqui
[email protected]Hello
From the docs:
ALL
If you specify ALL, then Oracle evaluates each WHEN clause regardless of the results of the evaluation of any other WHEN clause. For each WHEN clause whose condition evaluates to true, Oracle executes the corresponding INTO clause list.
FIRST
If you specify FIRST, then Oracle evaluates each WHEN clause in the order in which it appears in the statement. For the first WHEN clause that evaluates to true, Oracle executes the corresponding INTO clause and skips subsequent WHEN clauses for the given row.
ELSE clause
For a given row, if no WHEN clause evaluates to true:
* If you have specified an ELSE clause, then Oracle executes the INTO clause list associated with the ELSE clause.
* If you did not specify an else clause, then Oracle takes no action for that row.
See Also:
"Multitable Inserts: Examples"
Restrictions on Multitable Inserts
* You can perform multitable inserts only on tables, not on views or materialized views.
* You cannot perform a multitable insert into a remote table.
* You cannot specify a table collection expression when performing a multitable insert.
* In a multitable insert, all of the insert_into_clauses cannot combine to specify more than 999 target columns.
* Multitable inserts are not parallelized in a Real Application Clusters environment, or if any target table is index organized, or if any target table has a bitmap index defined on it.
* Plan stability is not supported for multitable insert statements.
* The subquery of the multitable insert statement cannot use a sequence.
So given this the following example shows the difference:
SQL> CREATE TABLE dt_test_insert_base as select rownum id from dba_objects where rownum <=20
2 /
Table created.
SQL> CREATE TABLE dt_test_insert_1 (id number)
2 /
Table created.
SQL> CREATE TABLE dt_test_insert_2 (id number)
2 /
Table created.
SQL>
SQL> INSERT ALL
2 WHEN rownum <=15 THEN
3 INTO dt_test_insert_1 (id)
4 WHEN rownum >=10 THEN
5 INTO dt_test_insert_2 (id)
6 SELECT
7 ID
8 FROM
9 dt_test_insert_base
10 /
26 rows created.
SQL>
SQL> SELECT * from dt_test_insert_1
2 /
ID
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
15 rows selected.
SQL> SELECT * from dt_test_insert_2
2 /
ID
10
11
12
13
14
15
16
17
18
19
20
11 rows selected.
SQL>
SQL> TRUNCATE TABLE dt_test_insert_1
2 /
Table truncated.
SQL> TRUNCATE TABLE dt_test_insert_2
2 /
Table truncated.
SQL>
SQL> INSERT FIRST
2 WHEN rownum <=15 THEN
3 INTO dt_test_insert_1 (id)
4 WHEN rownum >=10 THEN --This condition is ignored until the value of id is > 15
5 INTO dt_test_insert_2 (id)
6 SELECT
7 ID
8 FROM
9 dt_test_insert_base
10 /
20 rows created.
SQL> SELECT * from dt_test_insert_1
2 /
ID
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
15 rows selected.
SQL> SELECT * from dt_test_insert_2
2 /
ID
16
17
18
19
20HTH
David -
Whats the difference between an iPhone 5s and a iPhone 5c
Whats the difference between the iphone 5s and the iphone 5c???
Rider11 wrote:
The 5c has plastic backs with different colors just for fun other then that nothing is different.
You'd better look up the above linked comparison as well if you believe you are correct.... -
How to get the link between mara, ausp, cawn and cawnt tables
hello ABAPERS
i have got a requiremet in that i have to get the relation .
how to get the link between mara, ausp, cawn and cawnt tables and also type how can we get link between char value and char description in cawn and cawnt tables through ausp and mara tables.
I would be very thankful for ur help in advance.
Thanks & Regards.
soniHi,
Sample report using the linkage between tables;
report batch_char no standard page heading
line-size 132
line-count 58(1)
message-id mm.
Report by Batch Characteristic *
Description : Report by Batch Characteristic *
Declaration for Tables
tables: mara, " Material Master
mard, " Storage Location Data for Material
t001w, " Plants/Branches
t001l, " Storage Locations
cabn, " Characteristics
inob. " Link between Internal Number and Object
Declaration for Constants
constants : c_klart like ausp-klart value '023', " Class Type
c_obtab like inob-obtab value 'MCH1', " Database Table
c_flag type c value 'X', " Flag
c_c23 type i value '23', " Ratio
Constants for Ratio Categories
c_13 type p decimals 2 value '13.00', " For Ratio 13
c_1499 type p decimals 2 value '14.99', " For Ratio 14.99
c_15 type p decimals 2 value '15.00', " For Ratio 15
c_1699 type p decimals 2 value '16.99', " For Ratio 16.99
c_17 type p decimals 2 value '17.00', " For Ratio 17
c_1899 type p decimals 2 value '18.99', " For Ratio 18.99
c_19 type p decimals 2 value '19.00', " For Ratio 19
c_2099 type p decimals 2 value '20.99', " For Ratio 20.99
c_21 type p decimals 2 value '21.00', " For Ratio 21
c_2299 type p decimals 2 value '22.99', " For Ratio 22.99
c_23 type p decimals 2 value '23.00', " For Ratio 23
c_g23(4) type c value '>=23', " For Ratio >=23
c_ratio(5) value 'RATIO', " For Ratio
Constants for Storing Selected item field information
c_cursor1(15) value 'I_OUTPUT1-MEINS', " For Selected Base
" Unit of Measure
c_cursor2(15) value 'I_OUTPUT1-MATNR', " For Selected Base
" Material Number
c_cursor3(15) value 'I_OUTPUT1-MAKTX', " For Selected Base
" Material Des.
c_cursor4(15) value 'I_OUTPUT1-CLABS', "For Selected Base
" Stock Value
c_cursor5(15) value 'I_OUTPUT1-ATFLV', " For Selected Base
" Char.Value (Ratio)
c_cursor6(5) value 'C_G23'.
Declaration for Global Variables
data : g_exit type c, " Flag
g_clabs1(16) type c, " Quantity
g_clabs(18) type c, " Quantity
g_cursor(15) type c, " Cursor field name
g_matnr type mara-matnr, " Material Number
g_werks type mchb-werks, " Plant
g_atinn(30) type c. " Character.
Declaration for Internal tables
Internal table to hold Batch Stock data
data : begin of i_mchb occurs 0,
matnr like mchb-matnr, " Material Number
werks like mchb-werks, " Plant
lgort like mchb-lgort, " Storage Location
charg like mchb-charg, " Batch Number
clabs like mchb-clabs, " Stock Value
meins like mara-meins, " Unit of measure
atflo like ausp-atflv, " Char.Value (Ratio)
atflv like ausp-atflv, " Char.Value (Ratio)
end of i_mchb.
Internal table to hold Secondary List data
data : begin of i_mchb1 occurs 0,
werks like mchb-werks, " Plant
matnr like mchb-matnr, " Material Number
lgort like mchb-lgort, " Storage Location
charg like mchb-charg, " Batch Number
atinn like ausp-atinn, " Char.Value
clabs like mchb-clabs, " Stock Value
atflo like ausp-atflv, " Char.Value (Ratio)
atflv like ausp-atflv, " Char.Value (Ratio)
end of i_mchb1.
Internal table to get the Plant Name
data : begin of i_plant occurs 0,
werks like t001w-werks, " Plant
name1 like t001w-name1, " Name
end of i_plant.
Internal table to get the Material Description
data : begin of i_makt occurs 0,
matnr like makt-matnr, " Material
maktx like makt-maktx, " Description
end of i_makt.
Internal table to hold AUSP data
data : begin of i_ausp occurs 0,
objek like ausp-objek, " Object No
atinn like cabn-atinn, " Characteric value
atflv like ausp-atflv, " Characteristic Value
end of i_ausp.
Internal table to hold output data
data : begin of i_output occurs 0,
atinn like cabn-atinn, " Characteric value
werks like mchb-werks, " Plant
matnr like mchb-matnr, " Material Number
atnam like cabn-atnam, " Characteristic
atflv like ausp-atflv, " Char.Value (Ratio)
name1 like t001w-name1, " Plant Description
maktx like makt-maktx, " Material Description
clabs like mchb-clabs, " Stock Value
meins like mara-meins, " Base Unit of Measure
end of i_output.
Internal table to hold final Output data
data : begin of i_output1 occurs 0,
atinn like cabn-atinn, " Characteric value
werks like mchb-werks, " Plant
matnr like mchb-matnr, " Material Number
atnam like cabn-atnam, " Characteristic
atflv(32) type c, " Char.Value (Ratio)
name1 like t001w-name1, " Plant Description
maktx like makt-maktx, " Material Description
clabs like mchb-clabs, " Stock Value
meins like mara-meins, " Base Unit of Measure
end of i_output1.
Selection screen
selection-screen begin of block b1 with frame title text-001.
select-options: s_werks for t001w-werks obligatory, " Plant
s_lgort for t001l-lgort, " Stor.Location
s_matnr for mara-matnr obligatory, " Material No
s_atinn for cabn-atinn. " Character.
selection-screen end of block b1.
At selection screen
at selection-screen.
Validation of Selection Screen Fields
perform validate_screen.
Start of selection
start-of-selection.
Get the Material and Batch Stock data from MARA and MCHB Tables
perform get_mat_stock_data.
Get the Material Group Text and Plant Name from T023T and T001W Tables
perform get_plant_grp_data.
Append the data into final Output Internal Table after getting the
Characteristic Values data from INOB and AUSP Tables
perform append_final_data.
Processing if the Characteristics contain 'RATIO'
perform collect_ratio.
End-of-Page
end-of-page.
write /1(125) sy-uline.
End of selection
end-of-selection.
if g_exit <> c_flag.
Display the Report Output data
perform display_report.
endif.
Top-of-Page
top-of-page.
Write the Report and Column Headings
perform get_headings.
at line-selection
at line-selection.
if sy-lsind = 1.
perform display_batch.
endif.
Top of page during line-selection
top-of-page during line-selection.
perform heading_seclist.
Form validate_screen
Validation of Selection Screen fields
form validate_screen.
Validation of Plant
clear t001w.
if not s_werks[] is initial.
select werks
into t001w-werks
from t001w
up to 1 rows
where werks in s_werks.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Plant'(002).
endif.
endif.
Validation of Material Number
clear mara.
if not s_matnr[] is initial.
select matnr
into mara-matnr
from mara
up to 1 rows
where matnr in s_matnr.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Material'(003).
endif.
endif.
Validation of Storage Location
clear t001l.
if not s_lgort[] is initial.
select lgort
into t001l-lgort
from t001l
up to 1 rows
where lgort in s_lgort.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Storage Location'(004).
endif.
endif.
Validation of Characteristic Value
clear cabn.
if not s_atinn[] is initial.
select atinn
into cabn-atinn
from cabn
up to 1 rows
where atinn in s_atinn.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Characteristic Value'(005).
endif.
endif.
Validation of Plant, Material and Storage Location
clear mard.
select matnr werks lgort
into (mard-matnr, mard-werks, mard-lgort)
from mard
up to 1 rows
where matnr in s_matnr and
werks in s_werks and
lgort in s_lgort.
endselect.
if sy-subrc <> 0.
message e899 with 'No Data found for the Selection Criteria'(006).
endif.
endform. "validate_screen
*& Form get_headings
Write the Report and Column Headings
form get_headings.
data: l_repid type sy-repid.
l_repid = sy-repid.
call function 'Y_STANDARD_HEADING'
exporting
repid = l_repid
heading1 = sy-title.
write:/1(125) sy-uline.
format color col_heading on.
write : /1 sy-vline, 2(18) 'Material Number'(008) centered,
20 sy-vline, 21(40) 'Material Description'(011) centered,
61 sy-vline, 62(22) 'Ratio'(009) centered,
84 sy-vline, 85(18) 'Quantity'(010) centered,
103 sy-vline, 104(20) 'Base Unit of Measure'(015) centered,
125 sy-vline.
write:/1(125) sy-uline.
format color off.
endform. "get_headings
*& Form get_mat_stock_data
Get the Material and Batch Stock data from MARA and MCHB Tables
form get_mat_stock_data.
clear: i_mchb,i_output, i_output1.
refresh: i_mchb,i_output, i_output1.
select a~matnr " Material Number
b~werks " Plant
b~lgort " Storage Location
b~charg " Batch Number
b~clabs " Stock Value
a~meins " Base Unit of Measure
into table i_mchb
from mara as a inner join mchb as b
on amatnr eq bmatnr
where b~matnr in s_matnr and
b~werks in s_werks and
b~lgort in s_lgort.
if sy-subrc <> 0.
g_exit = c_flag.
message s899 with 'No Data found for the Selection Criteria'(006).
stop.
endif.
sort i_mchb by matnr werks lgort charg.
endform. " get_mat_stock_data
*& Form get_plant_grp_data
Get the Material Group Text and Plant Name from T023T and T001W
form get_plant_grp_data.
if not i_mchb[] is initial.
Get the Plant Description from t001w Table
clear i_plant.
refresh i_plant.
select werks " Plant
name1 " Name
into table i_plant
from t001w
for all entries in i_mchb
where werks = i_mchb-werks.
Get the Material Description from MAKT Table
clear i_makt.
refresh i_makt.
select matnr " Material number
maktx " Material Description
into table i_makt
from makt
for all entries in i_mchb
where matnr = i_mchb-matnr and
spras = sy-langu.
sort i_plant by werks.
delete adjacent duplicates from i_plant comparing werks.
sort i_makt by matnr.
delete adjacent duplicates from i_makt comparing matnr.
endif.
endform. "form get_plant_grp_data.
*& Form append_final_data
Append the data into final Internal Table
form append_final_data.
data : l_matbatch(28),
l_tabix like sy-tabix.
if not i_mchb[] is initial.
loop at i_mchb.
l_tabix = sy-tabix.
clear l_matbatch.
concatenate i_mchb-matnr i_mchb-charg into l_matbatch.
move-corresponding i_mchb to i_output.
Get the Plant Description from i_plant Table
read table i_plant with key werks = i_mchb-werks binary search.
if sy-subrc = 0.
i_output-name1 = i_plant-name1.
endif.
Get the Material Description from i_makt Table
read table i_makt with key matnr = i_mchb-matnr binary search.
if sy-subrc = 0.
i_output-maktx = i_makt-maktx.
endif.
Get the Characteristic Values data from INOB and AUSP Tables
clear inob.
select single cuobj from inob
into inob-cuobj
where klart = c_klart and
obtab = c_obtab and
objek = l_matbatch.
if sy-subrc = 0.
select objek
atinn
atflv
from ausp
into table i_ausp
where objek = inob-cuobj and
atinn in s_atinn and
klart = c_klart.
sort i_ausp by objek atinn.
loop at i_ausp.
clear cabn.
select single atinn atnam from cabn
into (cabn-atinn,cabn-atnam)
where atinn = i_ausp-atinn.
if sy-subrc = 0.
If the ratio value is between 13-14.99, display 13
if cabn-atnam cs c_ratio.
if i_ausp-atflv between c_13 and c_1499.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_13.
If the ratio value is between 15-16.99, display 15
elseif i_ausp-atflv between c_15 and c_1699.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_15.
If the ratio value is between 17-18.99, display 17
elseif i_ausp-atflv between c_17 and c_1899.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_17.
If the ratio value is between 19-20.99, display 19
elseif i_ausp-atflv between c_19 and c_2099.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_19.
If the ratio value is between 21-22.99, display 21
elseif i_ausp-atflv between c_21 and c_2299.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_21.
If the ratio value is greater than or equal to 23, display 23
elseif i_ausp-atflv >= c_23.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_23.
endif. " Condition for RATIO values
else. " If characteristic does contain RATIO
i_mchb-atflv = i_ausp-atflv.
endif.
i_output-atinn = cabn-atinn.
i_output-atnam = cabn-atnam.
i_output-atflv = i_ausp-atflv.
i_mchb1-matnr = i_mchb-matnr.
i_mchb1-werks = i_mchb-werks.
i_mchb1-lgort = i_mchb-lgort.
i_mchb1-charg = i_mchb-charg.
i_mchb1-clabs = i_mchb-clabs.
i_mchb1-atinn = i_ausp-atinn.
i_mchb1-atflo = i_mchb-atflv.
i_mchb1-atflv = i_ausp-atflv.
append : i_output, i_mchb1.
clear i_mchb1.
modify i_mchb index l_tabix transporting atflo atflv .
endif.
endloop.
endif.
endloop.
endif.
Checking whether the table is filled or not
if not i_output[] is initial.
sort i_output by atinn werks matnr atflv.
else.
g_exit = c_flag.
message s899 with 'No Data found for the Selection Criteria'(006).
endif.
Delete the records where RATIO is less than 13.
delete i_output where atnam cs c_ratio and atflv lt c_13.
endform. "append_final_data
*& Form display_report
Display the Report Output data
form display_report.
data: l_tabix like sy-tabix.
loop at i_output1.
l_tabix = sy-tabix.
At new Characteristic
at new atinn.
read table i_output1 index l_tabix.
format color 1 intensified on.
write: /1 sy-vline, 2(20) 'Characteristic Name:'(007),
23(40) i_output1-atnam,
125 sy-vline.
format color off.
format color 4 intensified on.
write: /1 sy-vline, 2(20) 'Plant Name :'(022),
23(4) i_output1-werks, 29(30) i_output1-name1,
125 sy-vline.
format color off.
write /1(125) sy-uline.
endat.
clear: g_clabs, g_clabs1.
format color col_normal.
write :/1 sy-vline, 2(18) i_output1-matnr,
20 sy-vline, 21(40) i_output1-maktx,
61 sy-vline.
if i_output1-atflv = c_c23.
write: 62(22) c_g23 centered.
else.
shift i_output1-atflv left deleting leading space.
write: 62(22) i_output1-atflv centered.
endif.
write: 84 sy-vline,
103 sy-vline,
110(5) i_output1-meins.
If the quantity value is negative
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
format color off.
hide : i_output1.
new-line.
At end of material
at end of matnr.
sum.
move : i_output1-matnr to g_matnr.
format color 3 intensified on.
write /1(125) sy-uline.
write :/1 sy-vline, 2(25) 'Total for Material :'(012),
28(18) g_matnr.
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
write: 125 sy-vline.
format color off.
write /1(125) sy-uline.
endat.
At end of plant
at end of werks.
sum.
move : i_output1-werks to g_werks.
format color 3 intensified off.
write :/1 sy-vline, 2(25) 'Total for Plant :'(013),
28(4) g_werks.
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
format color off.
write /1(125) sy-uline.
endat.
At end of characteristic
at end of atinn.
read table i_output1 index l_tabix.
sum.
format color 3 intensified on.
write :/1 sy-vline, 2(25) 'Total for Characteristic:'(014),
28(25) i_output1-atnam.
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
format color off.
write /1(125) sy-uline.
endat.
endloop.
endform. " display_report
*& Form DISPLAY_BATCH
Display the batch details for the seclected material *
form display_batch.
Get the batch details for the selected material
get cursor field g_cursor.
if g_cursor = c_cursor1 or
g_cursor = c_cursor2 or
g_cursor = c_cursor3 or
g_cursor = c_cursor4 or
g_cursor = c_cursor5 or
g_cursor = c_cursor6.
format color 3.
write: /1 sy-vline,
2(17) 'Material Number :'(020),
20(17) i_output1-matnr,
94 sy-vline.
format color off.
write /1(94) sy-uline.
loop at i_mchb1 where matnr = i_output1-matnr and
atinn = i_output1-atinn and
atflo = i_output1-atflv.
format color col_normal.
shift i_mchb1-charg left deleting leading '0'.
write :/1 sy-vline, 2(16) i_mchb1-lgort centered,
18 sy-vline, 19(17) i_mchb1-charg centered,
36 sy-vline.
if i_output1-atnam cs c_ratio.
write: 37(29) i_mchb1-atflv
exponent 0 decimals 2 centered.
else.
write : 37(29) i_mchb1-atflv
exponent 0 decimals 0 centered.
endif.
write : 66 sy-vline, 67(27) i_mchb1-clabs unit i_mchb-meins,
94 sy-vline.
format color off.
endloop.
write /1(94) sy-uline.
else.
message s899 with 'Invalid cursor position'(016).
exit.
endif.
endform. " DISPLAY_BATCH
*& Form HEADING_SECLIST
Write the Column Headings for Interactive Report
form heading_seclist.
write /1(94) sy-uline.
format color col_heading on.
write :/1 sy-vline, 2(16) 'Storage Location'(021),
18 sy-vline, 19(17) 'Batch Number'(017) centered,
36 sy-vline, 37(29) 'Characteristic Value'(018) centered,
66 sy-vline, 67(27) 'Quantity'(019) centered,
94 sy-vline.
write /1(94) sy-uline.
format color off.
endform. " HEADING_SECLIST
*& Form COLLECT_RATIO
Display the Characteristic ratio data
form collect_ratio.
loop at i_output.
clear g_atinn.
i_output1-atinn = i_output-atinn.
i_output1-atnam = i_output-atnam .
i_output1-werks = i_output-werks.
i_output1-name1 = i_output-name1.
i_output1-matnr = i_output-matnr.
i_output1-maktx = i_output-maktx.
i_output1-clabs = i_output-clabs.
i_output1-meins = i_output-meins.
call function 'CONVERSION_EXIT_ATINN_OUTPUT'
exporting
input = i_output-atinn
importing
output = g_atinn.
if g_atinn cs c_ratio.
If the ratio value is between 13-14.99, display 13
if i_output-atflv between c_13 and c_1499.
i_output1-atflv = c_13.
If the ratio value is between 15-16.99, display 15
elseif i_output-atflv between c_15 and c_1699.
i_output1-atflv = c_15.
If the ratio value is between 17-18.99, display 17
elseif i_output-atflv between c_17 and c_1899.
i_output1-atflv = c_17.
If the ratio value is between 19-20.99, display 19
elseif i_output-atflv between c_19 and c_2099.
i_output1-atflv = c_19.
If the ratio value is between 21-22.99, display 21
elseif i_output-atflv between c_21 and c_2299.
i_output1-atflv = c_21.
If the ratio value is greater than or equal to 23, display 23
elseif i_output-atflv >= c_23.
i_output1-atflv = c_23.
endif.
write i_output1-atflv to i_output1-atflv .
else.
write i_output-atflv to i_output1-atflv exponent 0 decimals 0.
endif.
collect i_output1.
clear i_output1.
endloop.
sort i_output1 by atinn werks matnr atflv.
endform. " COLLECT_RATIO
Reward if useful..
Regards,
Anji -
Whats the difference between comparable and comparator?
whats the difference between comparable and comparator?
when must i use comparable, and when must i use comparator?whats the difference between comparable and
comparator?Comparable is from the java.lang package, Comparator from java.util.
when must i use comparable, and when must i use
comparator?Here's a tutorial on both:
http://java.sun.com/docs/books/tutorial/collections/interfaces/order.html -
Create or remove link between a webi doc and a category with SDK
Hi,
I'd like to use SDK to assign a category to a webi document, or to "uncategorized" document (remove the link between the document and a Corporate Category).
I first tried to select the document in the infostore (via infoobjects, "select * from CI_INFOOBJECTS where SI_ID = xxx") and use the "delete" option on the "SI_CORPORATE_CATEGORIES", but obviously, this is not the right method.
If someone has a little idea of how I can manage this link between a webi doc and a corp. category, I would be very grateful.
Thanks !
DavidHi,
This is much easier than it looks like, although it's not intuitive.
For example, when some webi is in a category, categories where the webi is linked are underlined in blue:
If you click in those blue marked categories and click Accept, you're unlinking the webi/report/dashboard from that category:
-->
Hope it helps
Alberto
Maybe you are looking for
-
Authentication in JSF 2.0
I could use some advise... I've been trying to implement authentication in a JSF 2.0 web application and I've not been completely successful. I'm using NetBeans 6.8 and GlassFish v3. Here is what I would like: 1) Use container managed security with a
-
Purchase order creation on an hourly basis
Hi all, My reqmnt is to create purchase orders for shipments on an houly basis . I have one pgm which creates purchase orders based on shipment cost numbers or shipment cost type . So I need to know how to include date and time of cost document creat
-
Problem: How to reduce display size in Xorg
I am really stuck at this. The problem is as follows: I have a DIY projector which uses a 17'' 1280x1024 LCD (Samsung 740n). Due to some technicalities the top and bottom 100px of the display are mostly unusable and I have covered them in isolation t
-
How to corret an execution plan that shows wrong number of rows?
Using Oracle 10gR2 RAC (10.2.0.3) on SUSE Linux 9 (x86_64). I have a partition table that has 5 million rows (5,597,831). However an execution plan against the table show that the table has 10 million rows. Execution plan: SELECT STATEMENT ALL_ROWS C
-
Route of the PCR Request - Changing Working Time
There is a standard 'PCR - Personnel Change Request' form called 'Change Working Time' (SPWT) This change request enables managers to request that an employees work schedule rule and employment percentage be changed in the Planned Working Time info