Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Enqueue lock object in abap mapping

Hi,

In a idoc to file scenario, i need to garantee a unique target filename for message.

I have a ZXI_I2155 table to mantain a counter by some key fields (cliente, anyo, mes)

So, in an abap mapping I have:

CALL FUNCTION 'ENQUEUE_EZXI_I2155'

EXPORTING

MODE_ZXI_I2155 = 'E'

MANDT = SY-MANDT

keycli = d_cliente

anyo = d_anyo

mes = d_mes

_WAIT = 'X '

EXCEPTIONS

FOREIGN_LOCK = 1

SYSTEM_FAILURE = 2

OTHERS = 3.

if sy-subrc = 0.

select single * from ZXI_I2155 into wa_registro

where keycli = d_cliente and anyo = d_anyo and mes = d_mes.

....

add 1 to wa_registro-contador.

modify ZXI_I2155 from wa_registro.

...

endif.

CALL FUNCTION 'DEQUEUE_EZXI_I2155'

EXPORTING

MODE_ZXI_I2155 = 'E'

MANDT = SY-MANDT

keycli = d_cliente

anyo = d_anyo

mes = d_mes.

endif.

concatenate 'ART' d_cliente d_mes wa_registro-contador '.XML' into d_fichero.

l_record-namespace = 'http://sap.com/xi/XI/System/File'.

l_record-name = 'FileName'.

l_record-value = d_fichero.

dynamic_configuration->add_record( l_record ).

With a normal situation, this scenario works well, but with a great volume of messages, some duplicate filename appears.

Why?

Thanks, in advance

Carme

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question