cancel
Showing results for 
Search instead for 
Did you mean: 

SFP Interface MEDRUCK Code Initialization ITEM or ITEMLINE

Former Member
0 Kudos

Hi,

In a version of SFP MEDRUCK I'm trying to process the table ITEM or ITEMLINE in the CODE INITIALIZATION. I need to get to a value in MARA-BISMT. In our system MARA-BISMT contains a vendor catalog # which needs to be included on our PO. So, I need to process ITEM or ITEMLINE then using MATNR go to MARA-BISMT and get the value and pass it to my form.

1) How do I process or read through all the lines in ITEM or ITEMLINE, his will get me to MATNR?

2) How do I pass corresponding MARA-BISMT values to my form?

Thank you,

Helen

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I determined how to do it.

IN SFP Interface did following:

In GLOBAL DATA added I_ITEM2 TYPE ZTY_MMPUR_PRINT_EKPO

In CODE INITIALIZATON added OUTPUT PARAMETERS I_ITEM2 and added following code.

i_item LIKE standard table of ITEM,

wa_item LIKE LINE OF ITEM.

LOOP at ITEM INTO wa_item.

SELECT BISMT

FROM MARA

INTO ws_bismt

WHERE MATNR = wa_item-matnr.

ENDSELECT.

MOVE ws_bismt to wa_item-emnfr.

APPEND wa_item to i_item2.

ENDLOOP.

Then SFP PDF FORM definition added I_ITEM2 to my form.

Thank you.

Former Member
0 Kudos

Hi,

I've been trying that approach but can't read/access ITEM as a table. I guess I'm on board with the concept but can't figure out the machanics of the coding. Any chance you can provide me with more details?

I got the following code to work proving I can access values in MARA but now I have to figure out how to access ITEM so I can put a variable in the where statment in place of hard coding '120070-ND'.

SELECT BISMT

FROM MARA

INTO ws_bismt

WHERE MATNR = '120070-ND'.

ENDSELECT.

Any help would be appreciated, regards, Helen

Former Member
0 Kudos

Hi Helen,

1) How do I process or read through all the lines in ITEM or ITEMLINE, his will get me to MATNR?

>>>> Using this table, get data from MARA using for all entries on ITEM table and populate all the data (item table + mara-bismt) into another table (Define Data Dictionary table type). Add optional Import parameter in the interface.

2) How do I pass corresponding MARA-BISMT values to my form?

>>>> Move this data from interface onto the context in the form. This can now be bound to the table which will show ITEM+BISMT on the form.

Hope this helps!

Regards,

Shyam.