Skip to Content
0
Former Member
Aug 04, 2006 at 10:54 AM

select quirey

27 Views

Hi experts

plz help me in writing select quiries for the following given specifications

All the tables and fields are given for ur information

plz help

1.Batch # (Lot No.) AFPO- CHARG CHAR 10 The Process Order(AFPO-AUFNR) passed by the transaction will be used to select the batch number(CHARG).

2. Part No. (NDC # and unit amount) AFPO- MATNR CHAR 18 The Process Order(AFPO-AUFNR) passed by the transaction will be used to select the material number(MATNR).

Include dashes

3. Page No. AFPO-AUFNR CHAR 12 The process order(AFPO-AUFNR) is being passed by the transaction.

Extract last digit from the order number.

4. Bottle Amount AFPO- MATNR CHAR 18

Last two digits of the material number(AFPO-MATNR) should be converted to a single digit and concatenated with a “C”.

Ex. 0378-0357-01

01 = 1C.

Bottle Amount = 1C.

5. Quantity AFKO- GAMNG CHAR 17 Select the total amount(AFKO-GAMNG) where the procress order(AFKO-AUFNR) equals the procress order selected from AFPO-AUFNR.

6. Strength AUSP-ATWRT CHAR 10 Select the Characteristic Value (AUSP-ATWRT), where the Internal characteristic(AUSP-ATINN) equals ‘CASE_LABEL_DESC_LINE5’, the Class type (AUSP-KLART) equals ‘001’, and the Object(AUSP-OBJEK) = the material number’s Finished product material number(AFPO-MATNR).

Adjust AFPO-MATNR, remove the last 3 digits from the material number, then change the -01 at the end to -00.

Ex.

0378-0457-01-C1

0378-0457-01

0378-0457-00.

Regards

divya

points sure