02-05-2014 7:08 PM
Hi, guys.
I'm trying to retrieve reschedule date from MD04 transaction at BAPI_MATERIAL_STOCK_REQ_LIST but something wrong is happening...
In my case, I need to get the second one, "30.09.13" but it's returning "11.10.13" in my table MRP_IND_LINES, field RESCHED_DATE.
Does anyone have any idea how can I find this date?
Thanks!
02-06-2014 11:41 AM
I did it work:
REPORT zteste106.
DATA:
v_aussl TYPE mdps-aussl ,
v_rdmng TYPE mdps-rdmng ,
v_umdat TYPE mdps-umdat ,
v_webaz TYPE mdps-webaz ,
v_fabkl TYPE t001w-fabkl,
v_ausnx TYPE rf61r-ausn1,
v_auslx TYPE rf61r-ausl1,
v_dt_texto TYPE rf61r-ausl1,
v_dt_reprog TYPE mdps-umdat ,
v_posicao TYPE i .
CONSTANTS:
c_antecipar_operacao TYPE t458a-aussl VALUE 'U1'.
START-OF-SELECTION.
v_aussl = c_antecipar_operacao.
v_umdat = '20131011'. " <<----
v_webaz = 10 . " <<----
v_fabkl = 50 . " <<----
PERFORM build_exception_string(saplm61r)
USING v_aussl " Chave mensagem de exceção
v_rdmng " Qtd.excesso de estoque
v_umdat " Data de reprogramação de prazos
v_webaz " Tempo de processamento (em dias) da entrada de mercadorias
v_fabkl " Chave do calendário de fábrica
CHANGING v_ausnx " Nº mensagem de exceção
v_auslx. " Texto mensagem de exceção
SEARCH v_auslx FOR '/'.
v_posicao = sy-fdpos + 1.
WRITE v_auslx+v_posicao TO v_dt_texto.
REPLACE ')' WITH space INTO v_dt_texto.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = v_dt_texto
IMPORTING
date_internal = v_dt_reprog
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
02-05-2014 8:28 PM
I found the FM ANZEIGEN_DISPOELEMENT and in form build_exception_string the local variable l_umda2 has the value that I'm looking for.
I don't know if I can use it in my ABAP code, because there is some CALL SCREENs in that, and I'll use it to make a ALV Report that shows this date (and other fields).
Any suggestions?
02-06-2014 11:41 AM
I did it work:
REPORT zteste106.
DATA:
v_aussl TYPE mdps-aussl ,
v_rdmng TYPE mdps-rdmng ,
v_umdat TYPE mdps-umdat ,
v_webaz TYPE mdps-webaz ,
v_fabkl TYPE t001w-fabkl,
v_ausnx TYPE rf61r-ausn1,
v_auslx TYPE rf61r-ausl1,
v_dt_texto TYPE rf61r-ausl1,
v_dt_reprog TYPE mdps-umdat ,
v_posicao TYPE i .
CONSTANTS:
c_antecipar_operacao TYPE t458a-aussl VALUE 'U1'.
START-OF-SELECTION.
v_aussl = c_antecipar_operacao.
v_umdat = '20131011'. " <<----
v_webaz = 10 . " <<----
v_fabkl = 50 . " <<----
PERFORM build_exception_string(saplm61r)
USING v_aussl " Chave mensagem de exceção
v_rdmng " Qtd.excesso de estoque
v_umdat " Data de reprogramação de prazos
v_webaz " Tempo de processamento (em dias) da entrada de mercadorias
v_fabkl " Chave do calendário de fábrica
CHANGING v_ausnx " Nº mensagem de exceção
v_auslx. " Texto mensagem de exceção
SEARCH v_auslx FOR '/'.
v_posicao = sy-fdpos + 1.
WRITE v_auslx+v_posicao TO v_dt_texto.
REPLACE ')' WITH space INTO v_dt_texto.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = v_dt_texto
IMPORTING
date_internal = v_dt_reprog
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.