Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Please help me

Former Member
0 Kudos
192

Hi,

Please write the logic for this .

1) Create the Selection Screen as mentioned below

Movement Type Range MSEG-BWART

Plant Range MSEG-WERKS

Delivery Range MKPF-XBLNR

Vendor Range MSEG-LIFNR

Material Doc Date Range MKPF-BUDAT

Material Doc. Year Range MSEG-MJAHR

Country Range KNA1-LAND1

2) Validate the Selection screen Fields

3) Get the Data from the Tables based on the selection screen as per the below logic

3.1) Get the Material(MATNR), Plant(WERKS), Batch Code (CHARG), Quantity(MENGE), Total Value( BUALT ) data from the MSEG Table into internal table I_MSEG based on the selection Screen Fields Movement Type (S_BWART), Plant (S_WERKS), Vendor (S_LIFNR),

Material Doc. Year (S_MJAHR).

3.2) Get the Material Description (MAKTX) from the MAKT table based on the records in the internal table I_MSEG into internal table I_MAKT where MATNR is same.

3.3) Get the Old Old Material Number (BISMAT), Product Hierarchy Code (PRDHA ), Base Unit(MEINS) from the MARA table based on the records in the internal table I_MSEG into I_MARA where MATNR is same.

3.4) Get the Product Hierarchy Description (VTEXT) from the T179T table based on the records in the internal table I_MARA in to the internal table I_T179T where PRDHA is same; store the material (MATNR) field values in I_T179T internal table.

3.5) Get the Sold to Customer & Ship to Customer Details as

3.5.1) Get the Reference Doc No (XBLNR) from the MKPF table for all the records in the internal table I_MSEG in to the internal table I_MKPF where Material Doc (MBLNR) and year (MJAHR) are same.

3.5.2) Get the Delivery No(VBELN),KUNAG (Sold To Party), KUNNR( Ship to Party), Inco-Term(INCO1) from the LIKP table for all the records in the I_MKPF into the internal table I_LIKP where Delivery no and the Reference no are same .

3.6) Get the Customer Name 1(NAME1), House Number and Street(STRAS), City(ORT01), State(REGIO), Postal Code (PSTLZ), Country(LAND1) from the KNA1 table into I_KNA1 for all the records in the internal table I_MSEG where Customer Name 1(NAME1) is same as Vendor Account Number(LIFNR) or using the I_LIKP internal table Sold to Party(KUNAG) for the Sold to Customer & Ship to Customer.

3.7) Get the Country Name (LANDX) from the T005T table into the internal table I_T005T for all the records in the internal table I_KNA1 where Country name ( landx ) is same as I_KNA1-LAND1.

3.8) Get the CommCode/ImpCodeNo (STAWN), Country of Origin from MM (HERKL) from the MARC table in to the internal table I_MARC for all the records in the internal table I_MSEG where Material NO (Matnr) is same.

3.9) Get the CommCode/ImpCodeNo. Description (TEXT1) from the T604T table in to the internal table I_T604T for all the records in the internal table I_MARC CommCode/ImpCodeNo (STAWN) is same.

3.10) Get the Legal Regulation for Legal Control (GEGRU ), Export Control Class (ALNUM ), Grouping for Legal Control (EMBGR ) from the MAEX table in to the internal table I_ MAEX for all the records in the internal table I_MSEG Material No (MATNR) is same.

3.11) Get the Sales Order

3.11.1) Get the Sales Order Number (VBELV) from the table VBFA into the internal table I_VBFA for all the records in the internal table I_MKPF where VBFA-VBTYP_V = “C” & VBFA-VBTYP_N = “J”, VBFA-VBELN = Delivery Number (I_MKPF-XBLNR)

3.11) Get the RTA Invoice No

3.11.1) Get the RTA Invoice No (VBELN ) from the table VBFA into the internal table I_VBFA for all the records in the internal table I_MKPF where VBFA-VBELV = Delivery Number (MKPF-XBLNR), VBFA-VBTYP_N = “M”, VBFA-VBTYP_V = “J”.

4) Process all the records in the internal table I_MSEG. Read all the above internal tables and move the values in to the final internal table I_OUTPUT.

5) Build the Filed Catlog for displaying the Headings of the field.

6) Use the Function module REUSE_ALV_GRID_DISPLAY to display the output and pass the appropriate internal tables.

Thanks

4 REPLIES 4

Former Member
0 Kudos
86

I am writing the code for this now. Give me half an hour or so.......

Former Member
0 Kudos
86

Don't take Martin's solution - it will be rubbish. I'll do a much better one and I'll only charge you half of what he does.

How about you try to do your own job yourself? Unless you are willing to pay me £1000 per day to do your job, why should I spend my time and effort to complete your work?

This forum is to help people with technical issues related to ABAP development - not for people to post asking for others to do their work. If you don't know what you are doing, be honest and tell your project manager, client, line manager, etc. Don't rely on others on here to do your job for you.

Gareth.

Former Member
0 Kudos
86

how much will you pay for it???

Former Member
0 Kudos
86

Why not try coding this yourself? If you have problems then post them Hard to learn something if you don't give it a shot yourself and get your fingers dirty.