cancel
Showing results for 
Search instead for 
Did you mean: 

DMS link to Purchase order & purchase contract

0 Kudos

Dear DMS experts,

Currently our client has following requirement - Attach DIRs at header level of Purchase order (ME23N) & Purchase contract (ME33K).

Both these SAP objects have same master table EKKO.

I was following the steps mentioned in SAP note 1417841.

However while maintaining the configuration 'Maintain Key fields' I came across the problem.

In this key fields screen, I can not enter EKKO table entry twice, since column 'Table' is the primary key.

Has any one tried this scenario before, for both these purchasing objects?

Looking forward to your expert help!

BR

Tushar.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Even you attach link EKKO table it cannot be viewed at header level, You need to enter the DIR number at item level only.

These tables are to link the Purchasing document number with DIR but not at header level, If you require to have at header level you may need to go for an development. WIth the below settings you can view the DIR at item level only.

Rgds,

Nayeem.

0 Kudos

Hi Nayeem,

Thanks for the reply, I had the same information earlier.

Nevertheless, we have to attach the DIRs to the header level of Purchase Order & Purchase Contract.

Before we do the ABAP development, it's required to do this configuration of 'Maintain Key Fields'.

And here we're stuck. Since we're not sure what values are to be used in this 'Maintain Key Fields' customizing.

Anyways, thanks for the response.

Cheers,

Tushar.

Former Member
0 Kudos

HI,

If you are going for an ABAP development, I think the "Maintain key fields settings " is not required. Since you can call the DIR through ABAP code it self.

Rgds,

Nayeem.

0 Kudos

http://help.sap.com/saphelp_erp60_sp/helpdata/en/b2/c043a66fab11d1949500a0c92f024a/content.htm

Hi Nayeem,

The implementation of this functionality is combination of both customizing as well as ABAP development.

Help documentation link from SCN. But as I mentioned earlier, we're stuck in the first step of customizing.

Cheers,

Tushar

Former Member
0 Kudos

Yes, You are right, Can you try giving EKPO for PO and EKKO for contract.

Rgds,

Nayeem.

0 Kudos

EKKO & EKPO can not be given, since they are already being used.

The first column in this customizing is the key field, can't be entered twice

benedikt_wagner_mdt
Active Participant
0 Kudos

Hi Tushar,

I don't understand your problem. In the mentioned customizing table (by the way: it is TCLO) you can maintain the key fields of tables.

Therefore every table can be entered only once because there is only one primary key for a table. Please recognize that you can scroll to the right and enter additional key fields (as it is necessary for EKPO: EBELN/EBELP).

The column "Transaction Code" is used to have a destination where to go if you are in an document info record and navigate to a linked object (e. g. material).

Unfortunately there is a problem with tables that are used for multiple object types as EKKO.

But you could solve this by creating a custom transaction that takes the EKKO-EBELN number, checks the type of the object and then calls  ME23N/ME33K depending on the type.

Regards,

Benedikt

0 Kudos

hi Benedikt,

Thanks for the reply. You understood my scenario correctly.
However I don't think creating a custom transaction will be feasible for ME23N/ME33K.

Maybe we need to find another table which contains EBELN as the key field.

If I find the solution i'll post it here.

Cheers,

Tushar

benedikt_wagner_mdt
Active Participant
0 Kudos

Hi Tushar,

the transaction will only be used for navigation from DIR/object link tab to the matching EKKO transaction. No user will have to use this transaction. It is a simple report:

REPORT Z_CALL_EKKO_TRANS.

START-OF-SELECTION.

  DATA: lv_ebeln type ekko-ebeln,
        lv_bstyp TYPE ekko-bstyp.

  get PARAMETER ID 'BES' field lv_ebeln.

  SELECT SINGLE bstyp FROM ekko
     INTO lv_bstyp
    WHERE ebeln = lv_ebeln.
  CASE lv_bstyp.
    WHEN 'F'.
      CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    WHEN 'K'.
      CALL TRANSACTION 'ME33K'AND SKIP FIRST SCREEN.
    WHEN OTHERS.
      MESSAGE 'Wrong EKKO-type' TYPE 'I'.
  ENDCASE.

Regards,

Benedikt

0 Kudos

Hi Benedikt,

Thanks for the codes. I've already asked our developer to do a test with it.

The other part of customizing 'Maitain Key fields' - Since EKKO can't be used more than once, can we use any other standard table which has EBELN as key field?

Ex - EKKN?

Any pointers in this regard?

Cheers

Tushar.

benedikt_wagner_mdt
Active Participant
0 Kudos

Hi Tushar,

I think using EKKN is possible, but it will be misleading because EKKN contains other data.

I would create a Z-table (maybe structure is enough) with field EBELN.

In any way you have to do following things:

  • Create screen for object link tab EKKO (EBELN only)
  • create table (or structure Z_EKKO) for purchase order head
  • "Maintain Screen for Object Link" with new screen for EKKO and Z-table
  • "Maintain Key Fields" for Z-table and maintain ME23N
  • create function module "OBJECT_CHECK_<z-table>." as described in customizing help
  • "Define Document Types"/"Maintain object link description" for EKKO and Z-table
  • "Define Document Types"/"Define object links": document type/object (EKKO, Z-table)

Regards,

Benedikt