Update Vendors using Idoc.
Hi all,
We have two different SAP systems (call it system A and system B). The vendor data is created and updated in system A and CREMAS idoc is generated to pass the data to system B.
The problem come since the system B have some fields as display (the update has to be only possible from system A) that in system A are mandatory. The funtion that process the Idoc finally use a call transaction to XK02 so the fields are not updated in system B with the info sent from system A.
Could you help me to find some workarround to solve this situation?
Thanks in advance.
Regards.
Hi!
As everything in SAP these settings are stored in tables also. All you need to do is to find the table, which contains the screen layout of the XK02 transaction.
You have to put the idoc into a job
1. step: modify the screen layout to enable the read-only fields
2. step: idoc modify
3. step: modify back to the original layout
If these thisngs cannot be fit in the same job, you might create 3 different jobs with 3 different starting times (f.e: 22:00, 22:10, 22:20)
The screen layout can be found in customizing - SPRO transaction - Financial accounting - Accounts receivable and accounts payable - Vendor accounts - Master data - Preparations for master data - the first 3 entries here.
You might use the ST05 transaction to trace, which tables are modified here.
Best wishes
Tamá
Similar Messages
-
hello expert,
can you please tell me how to send only new recorded, or changed vedor master using IDOC, the problem is when i use BD14 or BD15, it's sends master data of all vendor even those that i've send before.
so can give me a solution.
thank you in advance.use change pointers ....it will then transfer only changed data or newly created ones
fot that you first have to activate the change pointers globally BD61 and then activate the change pointers for a specific message type and a specific field.BD50 ...so whenever ther is change to that field the data that has been changed will be recorded in BDCP table...
you can also schedule report RBDMIDOC with a particular message type as variant which will read all the changed records.
if there are multiplr changes during the day ....all of them would be recorded and would be sent together once RBDMIDOC runs...
Edited by: Tarang Shah on Mar 27, 2009 1:56 PM -
Vendor confirmation tab update using idoc ORDERS02
Hi all,
This is the first time i am working on idocs.
I have a requirement where i have to update the vendor confirmation tab in ME22n(Purchase order), I am using IDOC type ORDERS02. and i am using segment E1EDP20 to update quantity,date and reference no. This is working fine.
Now i need to update 2 more fields in the tab i.e confirmation category(EKES-EBTYP) and Date category of delivery date in vendor confirmation(EKES-LPEIN).But i dint find these fields in segment E1EDP20.
My question is whether these 2 fields are available in any other segment?
or should i extend the segment E1EDP20 ?is it the correct segment to be extended...
Please provide the inputs....<removed by moderator>
Regards,
Greeshma.
Edited by: Thomas Zloch on Feb 22, 2012Hi,
I have a questions for you and that will help me provide better solution .
a) Is vendor providing you the Confirmation category or are you expecting to get this information from Vendor ?
There are many points at which this information can be entered in ME22N.
1. When the Vendor Acknowledege your PO(If the Acknowledgment required is selected) .
2. When the Vendor request a change in schedule due to his own priorities .
3. When the Vendor actually does a goods issue and you are ready to do a Goods receipt.
In all these cases you update the system with confirmation category .In most cases this is the last phase of PO processing where you do the goods receipt and simultaneoulsy update the confirmation category. You are geting the quantity and the date updated from your schedule lines currently and since Schedules lines does not contain the confirmation category you are not getting it in E1EDP20.Confirmation category in most business scenarios is a mere stastical data rather than concrete data like schedule lines.
Depending on 1/2/3 you should be approching the solution. 1.If you want to update the confirmation category during the Order acknowledgment Use BAPI_PO_CHANGE and call it from the PI or middleware or(3) if during the Goods receipt then call the Exit of MIGO to get the PO populated if not exit then write a custom program to see all the Goods receipt and update the PO confirmation category accordingly (Remember this is a statstical data ). Although i highly doubt that the confirmation category will be provided by vendor it is the Buyer who will be determining it and that is why it is not there in the Standard Idoc.I shall not prefer the IDOC extension.
You can have a discussion with your Functional/Customer to figure out the best approcah. Word of Caution : Analyze before you extend an Idoc .
Thanks,
Anjaneya .
Edited by: Anjaneya Bhardwaj on Feb 24, 2012 7:33 AM -
Not able to update MARM using MATMAS03 iDOC
Hi, We are trying to update UOM fields (LAENG etc) in MARM table using iDOC MATMAS03. We are sending iDOCs from Business Objects Data Services. The iDOC is loaded successfully but it is not getting posted correctly. I don't get any error message but I just get warning message that "The data for the maintenance status S cannot be transferred.".
When I look into MARM table then record is not updated.
We tested same iDOC to update MARA table and we can do updates in MARA without any issue. Problem is with MARM table.
I don't think this is Data Service issue so I am posting this in ABAP forum. Please feel free to move to right forum.
Thanks,Hello Kalpesh,
I have several questions/points to make.
1. Do not send / for fields that are to be ignored. IDocs do not work the same as batch input session.
2. Are you entering X in the check box structure? Material Master/Article Master have check box segments that correspond to a regular segment. For example if you enter a value in field LENGTH of segment E1BPME1MARM, then you need to enter an X in the field LENGTH of segment E1BPME1MARMX.
3. Are you using the correct IDoc type? What is the industry-specific solution of your system? I have experience on the retail system which uses IDoc type ARTMAS03 (for article master). This IDoc type uses segments E1BPE1MARART, E1BPE1MARARTX, E1BPE1MAKTRT, E1BPE1MAKTRTX, E1BPE1MARMRT, E1BPE1MARMRTX, etc.
4. Is the port and partner profile set up correctly? Check with your basis consultant.
Kind Regards,
Rae Ellen Woytowiez -
Updating bill of lading on outbound delivery using IDoc/BAPI?
Hi,
We're looking to update our existing outbound deliveries with an entry in the bill of lading field. This is the only piece of data that needs changing in the delivery.
It seems that using IDocs message types like SHPCON/DESADV you cannot just update some header level fields. The BAPI_OUTB_DELIVERY_CHANGE unfortunately does not include bill of lading as one its changeable header fields.
Can anyone recommend a way how to still achieve this?
Thanks a lot,
RonaldHm, it looks like that segment should've worked...
WHEN 'E1EDT13'.
S_DT13 = IDOC_DATA-SDATA.
CASE S_DT13-QUALF.
WHEN '006'.
<...>
MV S_DT13-ISDD S_KOKO-WADAT_IST.
Did you put the date in the right field (ISDD) and did you try debugging this? -
Can we use idoc technique to change or delete the vendor master data?
Hi,gurus,
Can we use idoc technique to change or delete the vendor master data?You know we can create vendor data using idoc CREMAS03 as the receiver adapter,but when change or delete the specified vendor data,must we use RFC adapter technique?
Another question:I found the bapi which creates a vendor master data doesn't have the parameter account group,then we turned to idoc technique.But which adapter should I use when change or delete the vendor data?
Thanks in advance.Hi,
>>>I found the field of the segment of deletion flag at different level,and very appreaciate your help.
yes - LOEVM - but remember this will not delete the record but only mark it for deletion
>>>It's a long time to wait for your new blog,what new and interesting things do you find?
at least 4 new in my head - 2 simple but important and 2 new + I'd also like to write something for XI guys about
BO data integrator which can also work as EAI tool (BTW I know it's ETL) but how knows when they will appear
Regards,
Michal Krawczyk -
Posting Purchase Orders (IDOC Adapter) according to Vendor using BPM's
Hi,
My requirement is to post purchase orders into SAP r/3 according to vendor wise using IDOC adapter using BPM's.
Input is a FLAT File which contains all the Purchase order items/records for various vendors.
We need to process these items/records according to vendor and post it into SAP r/3 using IDOC Adapter within 8hrs processing time(Time Bound).
What i mean is: the process should collect all respective vendor related items/records from the flat file and post respective purchase orders in SAP. That means if 5 items out of 20 are from one vendor, we shud create a PO in SAP with 5 items for that vendor and likewise for the rest of the items.
Please explain the procedure and detail Mapping in step by step procedure... how to send 'n' items for a PO.
Regards,
Ravifor idoc configuration refer
https://wiki.sdn.sap.com/wiki/display/XI/SAP+R3+%28Idocs%29+To+XI+--+Steps+Summarized
Source WIKI. As far as BPM is concerned, set the correlation based on vendor number. this will ensure u collect the message according to vendor number.
there are two option set for ur for posting the PO WRT vendor number:
1. using BAPI
2. using idocs
The mapping for both the methods are straight forward except care need to be taken for mapping the data segment esp WRT the vendor number. -
Hi,
To update Vendor Confirmations manually in PO we first go for cancellation of PO release then we will update VCs.
Is it possible to update VCs without cancellation of PO release? If yes,pls explain the procedure.
Note that We are not using EDI & IDOC.
Regdshi,
u can do it.
u have to change the release iondicator from 1 to 3 or others related indiactor in customizing PO release strtagegy. -
Creating / updating vendor master from CREMAS03
Hi All,
I am getting vendor master data from external system and SAP XI will convert this into Idoc of message type CREMAS03. I would like to create/update vendor master in R/3 system from Idoc CREMAS03. Which function module / BAPI will cater to this need.
Thanks and best regards
KalingeriHi
Check in WE57 using the Message type & Idoc type & direction.
IDOC_INPUT_CREDITOR & IDOC_INPUT_CREDITOR_MDM are the the two Func modules being used. You can use any one of them based on your reuirement
Thanks & Regards
Kishore -
SRM-SUS 7.0 - Updating Vendor Bank from BP Bank Details
Hi SRM Gurus,
We are implementing SUS (SRM7.0) and part of the requirement is that we need to update vendor bank details in our ECC6.0 backend once our vendors have updated it in our SUS portal. We have used BBPGETVD to transfer data from our ECC to SUS. Now my question is how to bring updates such as bank details back into ECC from SUS. I am not sure if this need a custom solution or ALE or PI.
If you can provide documentations / guide it will be most helpful.
Thanks.
Kind Regards,
DarwinActually SUS does provide a standard update of bank data. What I am unsure about is whether this update is handled also in SUS (XI) - MM (IDoc CREMAS) mapping and finally update of the vendor data in MM via IDoc inbound processing.
In order to enable this you basically just need at least one entry in the bank table (bnka) in the SUS server, which can be created manually via transactionf FI01 or imported from files provided by difffering providers depending on the country for which you want bank data.
regards Thomas -
Error 'No tax code found for difference' in Posting Vendor Invoice IDOC
Hi All,
I am getting error message 'No tax code found for difference' while posting Vendor Invoice IDOC into SAP. IDOC type is INVOIC02. There is no difference in PO price, Invoice price and even Standard price. then why this error message? Other Vendor EDI settings are done ( OBCA, OBCD, OBCE etc). Is there any thing specific to be done in the config for this error?
IDOC has PO as reference document.
I looked into several threads in SDN forum but could not find proper solution
Can any ine help me with this issue?
Thanks in advance
HariHi
You might be missing the tax code for uploding through IDOC
so you can use the t.code we02 and give the doc and find the error
go to the WE19 to edit the tax code
and USE the t.code BD87 to select the doc and process it
thanks
Madhu -
Need help in populating Text ID using IDOC ORDERS05
I have following scenario.
PO is being send from ECC to EDI partner.
and we received the PO feedback from the EDI partner
For PO feed back, we are using ORDERS05 idoc type and ORDRSP message type.
Custom Text Id(F01) has been added to the Text tab of the header section of the Purchase order screen (ME23N).
Custom Text id (F02) has been added to the Text tab of the Item section of the purchase order screen.
(Text ID F01 and F02 are in object EKKO - checked in transaction se75)
Now, I m posting idoc with the following value but Text field (in header and item level) is not updating while displaying PO.
Header - E1EDKT1
TDID - F01
TSSPRAS- E
TDOBJECT - EKKO
E1EDKT2
TDLINE - "My Header Text"
Item Level - E1EDKT1
TDID - F02
TSSPRAS- E
TDOBJECT - EKKO
E1EDKT2
TDLINE - "My Item level Text"
Can we update the Text Id in PO using IDOC ORDRSP.ORDERS05? I have tried but it is not updating
Any suggestion.
Edited by: Chetankumar Patel on Mar 14, 2011 10:17 PMHave you tried with updating other Long texts ? While going through the code of inbound function module IDOC_INPUT_ORDRSP, it is mentioned that only limited fields are available for updation. See remarks in line no : 88 of include LEINMF2O.
read document and prepare for update P.O. Item fields
* possible Update fields of EKPO: LABNR, IDNLF, NETPR -
How to attempt production orders and get feedback by using IDocs
Hi,
I'm new new to SAP and R3 respectively mySAP. I need to know how to use IDocs (over file system) to attempt production orders to an extern application and how to get the feedback of the whole orders and single operations.
I found the IDoc-base-type "PPCC2RECORDER01" to send production orders. Is that the right base type for production orders?
(In consideration of compatibility and support me was recommend to avoid the old types OPERA2 and CONF21.)
What IDoc-types do I need to get feedback about a production order and its operations?
I hope someone is understanding my questions is able to help me. Please apologize my broken English.
Thanks!
HannesPROGRAM....... ZRCCLORDPROC
TITLE......... Production Odrer Idocs
AUTHOR........ Aveek Ghose
DATE WRITTEN.. 15/09/2006
R/3 RELEASE... 4.6C
=====================================================================*
COPIED FROM... N/A
DESCRIPTION...
*& Creation of production order IDOCs to a given selection
*& This program selects to an input given via the selection screen the *
*& corresponding production orders from the database. Then the function
*& module for creation of planned order idocs is called. *
*& In general this report is called from the report RCCLTRAN, but it *
*& can also be used for its own. *
=====================================================================*
PROGRAM TYPE.. Outbound Interface
DEV. CLASS.... ZPD1
LOGICAL DB.... N/A
=====================================================================*
SCREENS....... N/A
GUI TITLE..... N/A
GUI STATUS.... N/A
TRANSACTIONS.. N/A
USER EXITS.... N/A
=====================================================================*
CHANGE HISTORY *
Date By Correction Number & Brief Description Release
Tables / Structures
REPORT zrcclordproc
NO STANDARD PAGE HEADING
MESSAGE-ID ZCUST
LINE-COUNT 65(0)
LINE-SIZE 255.
INCLUDE RCORDO01. " PBO-Modules *
INCLUDE RCORDI01. " PAI-Modules *
INCLUDE RCORDF01. " FORM-Routines *
--> Global data
TYPE-POOLS: cloi.
include zprodata. "Types / constants for Orderselection
include zrcordtop. "Tables / Data for this report
include zrcordtop1.
include yrccl_constants.
TABLES : jcds,
tvarv,
zzzz_xref_data.
TYPES: BEGIN OF ty_date,
aufnr TYPE aufnr,
aedat TYPE aufaedat,
aezeit TYPE co_chg_time,
erdat TYPE auferfdat,
erfzeit TYPE co_ins_time,
loekz TYPE aufloekz,
indicator(1) TYPE c,
END OF ty_date.
DATA: is_enhancement type isu_ord_segments_determine.
DATA: itab_date TYPE STANDARD TABLE OF ty_date
INITIAL SIZE 0 WITH HEADER LINE.
DATA: f_objnr TYPE j_objnr.
DATA: g_report_sub_head(72) TYPE c, "Sub-Header hold area
g_report_head(72) TYPE c, "Header hold area
g_run_date(72) TYPE c, "Holds message for Run date
g_run_time(72) TYPE c. "Holds message for Run time
DATA:
f_old_date TYPE datum,
f_old_time TYPE uzeit,
f_continue(1) TYPE c.
END OF INSERTION DS001
--> Überschrift für sonstige Einstellungen
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN BEGIN OF BLOCK miscellaneous WITH FRAME.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN COMMENT 1(30) text-001. "#EC
SELECTION-SCREEN SKIP 1.
*>> Logical system comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-002.
SELECTION-SCREEN POSITION 35.
PARAMETERS opt_sys LIKE tbdlst-logsys.
SELECTION-SCREEN END OF LINE.
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-003.
SELECTION-SCREEN POSITION 35.
PARAMETERS mestyp LIKE tbdme-mestyp.
SELECTION-SCREEN END OF LINE.
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-004.
SELECTION-SCREEN POSITION 35.
PARAMETERS: p_date TYPE sydatum. "last run date
SELECTION-SCREEN END OF LINE.
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-005.
SELECTION-SCREEN POSITION 35.
PARAMETERS: p_time TYPE syuzeit. "last run time
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK MISCELLANEOUS.
*MOD-006
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-006.
SELECTION-SCREEN POSITION 35.
PARAMETERS: p_update AS CHECKBOX DEFAULT space.
SELECTION-SCREEN END OF LINE.
*MOD-006
*MOD-006
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-007.
SELECTION-SCREEN POSITION 32.
SELECT-OPTIONS: s_rundt FOR sy-datum NO-EXTENSION.
SELECTION-SCREEN END OF LINE.
*MOD-006
*MOD-006
*>> Messagetype comes from Report RCCLTRANS
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(30) text-008.
SELECTION-SCREEN POSITION 32.
SELECT-OPTIONS: s_runtm FOR sy-uzeit NO-EXTENSION.
SELECTION-SCREEN END OF LINE.
*MOD-006
**MOD-006
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 3(30) text-009.
*SELECTION-SCREEN POSITION 32.
*SELECT-OPTIONS: s_emat FOR zzzz_xref_data-z_in_value.
*SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK miscellaneous.
**MOD-006
Write selected AUFPL numbers via ranges table to memory ?
PARAMETERS:
ordtomem TYPE cloi_x DEFAULT '' NO-DISPLAY. "X: yes
do not select from MARC, but use ranges tables directly. MK 4.0C
matnr_gl and werks_gl must have the same length.
PARAMETERS: no_sel TYPE c DEFAULT ' ' NO-DISPLAY.
--> Normal selection parameters for ORD comes from the logical db
*& Event START-OF-SELECTION
START-OF-SELECTION.
--> Select the ORD according to the selected
MRP controller, Material, work center and plant
*MOD-006
Validate the last run date & Time
PERFORM validate_last_run_date_time.
*MOD-006
BEGIN OF INSERTION DS001
get the entry of the last program run
select single * for update from ycloidownlprot
where logsys = OPT_SYS and
downloadtype eq C_DOWNL_PROCESS_ORDERS.
if YCLOIDOWNLPROT-IN_PROGRESS eq CLOI_TRUE.
program is already running, do not allow to start again
write : / text-004, YCLOIDOWNLPROT-USERNAME.
exit.
endif.
YCLOIDOWNLPROT-MANDT = SY-MANDT.
YCLOIDOWNLPROT-LOGSYS = OPT_SYS.
YCLOIDOWNLPROT-START_DATE = SY-DATUM.
YCLOIDOWNLPROT-START_TIME = SY-UZEIT.
YCLOIDOWNLPROT-USERNAME = SY-UNAME.
YCLOIDOWNLPROT-DOWNLOADTYPE = C_DOWNL_PROCESS_ORDERS.
YCLOIDOWNLPROT-IN_PROGRESS = CLOI_TRUE.
insert or update entry (dependant if entry already exists)
MODIFY YCLOIDOWNLPROT.
COMMIT WORK.
CLEAR CREATED_MASTERIDOCS_PRO.
EXPORT CREATED_MASTERIDOCS_PRO TO MEMORY ID 'YLOI001'.
END OF INSERTION DS001
BEGIN OF INSERTION DS001
if not sscrfields-ucomm = 'ONLI'. mk zu 4.0
exit.
endif.
if s_dispo is initial and
s_matnr is initial and
s_arbpl is initial and
s_werks is initial.
exit.
endif.
Send only orders with type 40 - process orders
p_autyp = '40'.
END OF INSERTION DS001
*>> Put the ranges tabs back into matwrk list if no selection (NO_SEL)
IF no_sel = cloi_true.
CLEAR t_matwrk_key. REFRESH t_matwrk_key.
LOOP AT s_matnr.
t_matwrk_key-matnr = s_matnr-low.
READ TABLE s_werks INDEX sy-tabix.
t_matwrk_key-werks = s_werks-low.
APPEND t_matwrk_key.
ENDLOOP.
SORT t_matwrk_key BY matnr werks.
DELETE ADJACENT DUPLICATES FROM t_matwrk_key.
delete duplicate duplicates from ranges table. Therfore sort by LOW
(HIGH is not used in this case).
SORT s_matnr BY low.
DELETE ADJACENT DUPLICATES FROM s_matnr.
SORT s_werks BY low.
DELETE ADJACENT DUPLICATES FROM s_werks.
ENDIF.
--> Determine which segments are selected in the message type
PERFORM ord_segments_determine
USING mestyp
CHANGING afpo_x
jstk_x
afab_x
affl_x
afvo_x
kbed_x
jstv_x
resb_x
kbeu_x
afuv_x
is_enhancement
jstu_x.
Export the flags to the memory, because the following subroutine
must not have any parameters !!!
EXPORT affl_x
afvo_x
kbed_x
resb_x
kbeu_x
afuv_x
TO MEMORY ID 'LOI03'.
MK 19980326 enhanced selections on header/operation level
get selection profile for log system from customizing if available
SELECT SINGLE * FROM tcloi9 WHERE logsys = opt_sys.
if entry exists for the logical system
IF sy-subrc = 0.
if an selection profile for the order is entered, use it for selection
IF NOT tcloi9-ord_selid IS INITIAL.
p_selid = tcloi9-ord_selid.
ENDIF.
IF NOT tcloi9-ord_opr_selid IS INITIAL AND
NOT afvo_x IS INITIAL AND NOT affl_x IS INITIAL.
ord_opr_selid = tcloi9-ord_opr_selid.
ENDIF.
ENDIF.
initialize control key table for selections
CALL FUNCTION 'CLOI_STEUS_GET'
EXPORTING
logsys_to_init = opt_sys
IMPORTING
no_entry_for_logsys = no_entry_for_logsys
TABLES
t_steus = t_steus
EXCEPTIONS
logsys_not_initialized = 1
OTHERS = 2.
Write structure information into the memory
perform fill_memory_selobj.
-> import table with already sent orders
IMPORT gt_aufnrdone FROM MEMORY ID 'LOIAUFNRTAB'. "N599845
SORT gt_aufnrdone BY low. "N599845
--> Read header information
GET ioheader.
Check if material/plant combination is selected MK 4.0C
CLEAR check_flg.
IF no_sel = cloi_true.
READ TABLE t_matwrk_key
WITH KEY matnr = ioheader-matnr
werks = ioheader-werks BINARY SEARCH.
IF sy-subrc <> 0.
check_flg = cloi_true.
ENDIF.
ENDIF.
-> check if order was already sent
IF NOT gt_aufnrdone[] IS INITIAL. "N599845
READ TABLE gt_aufnrdone WITH KEY "N599845
low = ioheader-aufnr "N599845
TRANSPORTING NO FIELDS "N599845
BINARY SEARCH. "N599845
IF sy-subrc = 0. "N599845
-> order already sent
check_flg = cloi_true. "N599845
ENDIF. "N599845
ENDIF. "N599845
leave GET routine if check_flg is set.
CHECK check_flg IS INITIAL.
CLEAR t_afpo. REFRESH t_afpo.
CLEAR t_affl. REFRESH t_affl.
MOVE-CORRESPONDING ioheader TO t_afko.
GET ioheader LATE.
BEGIN OF INSERTION DS001
Check whether the process order has been changed since the last
run of the program
clear f_continue.
if the CHANGED date is greater than the last run or initial
IF IOHEADER-AEDAT GT F_OLD_DATE OR
( ioheader-aedat is initial and
ioheader-aezeit is initial ).
if the CHANGED date is initial check the creation date
if ioheader-aedat is initial.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF IOHEADER-ERDAT GT F_OLD_DATE OR
( IOHEADER-ERDAT EQ F_OLD_DATE AND
IOHEADER-ERFZEIT GE F_OLD_TIME ).
f_continue = 'X'.
endif.
else.
f_continue = 'X'.
endif.
if the CHANGED dat is not initial check it against the last run
ELSEIF IOHEADER-AEDAT EQ F_OLD_DATE AND
IOHEADER-AEZEIT GE F_OLD_TIME.
f_continue ='X'.
endif.
Aenderung 295/99 Selektions-Aenderung vom 26. August 99
Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
SELECT SINGLE * FROM JEST
WHERE OBJNR = F_OBJNR
AND STAT = 'I0045'.
IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
STAT EQ 'I0045' AND
INACT EQ SPACE.
letzte Aenderung des Status TABG wird geprueft Beg. WA 354/99
ENDSELECT.
IF ( F_OLD_DATE GT JCDS-UDATE OR " Beg JB_02
( F_OLD_DATE EQ JCDS-UDATE AND
F_OLD_TIME GT JCDS-UTIME ) ) AND " End JB_02
SY-SUBRC EQ 0.
CLEAR F_CONTINUE.
ENDIF.
ENDIF.
Ende 295/99
check f_continue eq 'X'.
END OF INSERTION DS001
t_afko-t_afpo = t_afpo[].
t_afko-t_jstk = t_jstk[].
t_afko-t_affl = t_affl[].
t_afko-t_afab = t_afab[].
APPEND t_afko.
IF jstk_x = cloi_x.
t_objnr-objnr = ioheader-objnr.
APPEND t_objnr.
ENDIF.
*---> Remember the orders that are already selected for the global
selection parameters
IF ordtomem = cloi_x. "write order numbers to memory
t_aufnr_range_done-sign = 'I'.
t_aufnr_range_done-option = 'NE'.
t_aufnr_range_done-low = ioheader-aufpl.
APPEND t_aufnr_range_done.
ENDIF.
*---> Remember the orders internal/external keys for AFAB (relationship)
IF afab_x = cloi_x.
MOVE-CORRESPONDING ioheader TO t_aufpl_aufnr.
APPEND t_aufpl_aufnr.
ENDIF.
check afpo_x = cloi_x.
GET ioitem.
BEGIN OF INSERTION DS001
Check whether the process order has been changed since the last
run of the program
CLEAR F_CONTINUE.
if the CHANGED date is greater than the last run or initial
IF IOHEADER-AEDAT GT F_OLD_DATE OR
( ioheader-aedat is initial and
ioheader-aezeit is initial ).
if the CHANGED date is initial check the creation date
if ioheader-aedat is initial.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF IOHEADER-ERDAT GT F_OLD_DATE OR
( IOHEADER-ERDAT EQ F_OLD_DATE AND
IOHEADER-ERFZEIT GE F_OLD_TIME ).
f_continue = 'X'.
endif.
else.
f_continue = 'X'.
endif.
if the CHANGED date is not initial check it against the last run
ELSEIF IOHEADER-AEDAT EQ F_OLD_DATE AND
IOHEADER-AEZEIT GE F_OLD_TIME.
f_continue ='X'.
endif.
Aenderung 295/99 Selektions-Aenderung vom 26. August 99
Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
SELECT SINGLE * FROM JEST
WHERE OBJNR = F_OBJNR
AND STAT = 'I0045'.
IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
STAT EQ 'I0045' AND
INACT EQ SPACE.
letzte Aenderung des Status TABG wird geprueft
ENDSELECT.
IF ( F_OLD_DATE GT JCDS-UDATE OR " Beg JB_02
( F_OLD_DATE EQ JCDS-UDATE AND
F_OLD_TIME GT JCDS-UTIME ) ) AND " End JB_02
SY-SUBRC EQ 0.
CLEAR F_CONTINUE.
ENDIF.
ENDIF.
Ende 295/99
check f_continue eq 'X'.
END OF INSERTION DS001
IF afpo_x = cloi_x.
MOVE-CORRESPONDING ioitem TO t_afpo.
APPEND t_afpo.
ENDIF.
Put matnr and ltrmi in a help structure, which later goes to t_afpo
IF ioitem-posnr = '0001'.
MOVE-CORRESPONDING ioitem TO help_afpo.
APPEND help_afpo.
put PSP element (internal key) into order header. Unique for positions
IF t_afko-pspel IS INITIAL.
t_afko-pspel = ioitem-projn.
ENDIF.
ENDIF.
CHECK affl_x = cloi_x.
GET iosequen.
CLEAR t_afvo. REFRESH t_afvo.
MOVE-CORRESPONDING iosequen TO t_affl.
GET iosequen LATE.
t_affl-t_afvo = t_afvo[].
APPEND t_affl.
CHECK afvo_x = cloi_x.
GET iooper.
CLEAR t_kbed. REFRESH t_kbed.
CLEAR t_afuv. REFRESH t_afuv.
CLEAR t_resb. REFRESH t_resb.
MOVE-CORRESPONDING iooper TO t_afvo.
"Temporary storing of operation information if for a phase
"the corresponding operation has is needed
MOVE-CORRESPONDING iooper TO t_aufpl_aplzl_vornr.
APPEND t_aufpl_aplzl_vornr.
check, if selection profile (if exists) for the operation is ok
IF NOT ord_opr_selid IS INITIAL.
CALL FUNCTION 'STATUS_CHECK_BY_SELSCHEM'
EXPORTING
objnr = iooper-objnr
selid = ord_opr_selid
IMPORTING
fullfill = status_ok
EXCEPTIONS
no_stat_tab = 1
no_stat_scheme = 2
OTHERS = 3.
IF sy-subrc <> 0.
status_ok = cloi_x.
ENDIF.
ELSE.
status_ok = cloi_x.
ENDIF.
check if control key (STEUS) should not be selected.
control_key_ok = cloi_x.
IF no_entry_for_logsys IS INITIAL.
READ TABLE t_steus WITH KEY
steus = iooper-steus BINARY SEARCH.
IF sy-subrc <> 0.
CLEAR control_key_ok.
ENDIF.
ENDIF.
CHECK NOT status_ok IS INITIAL.
CHECK NOT control_key_ok IS INITIAL.
GET iooper LATE.
t_afvo-t_kbed = t_kbed[].
t_afvo-t_afuv = t_afuv[].
t_afvo-t_resb = t_resb[].
APPEND t_afvo.
IF jstv_x = cloi_x.
t_objnr-objnr = iooper-objnr.
APPEND t_objnr.
ENDIF.
CHECK kbed_x = cloi_x.
GET ioopcap.
MOVE-CORRESPONDING ioopcap TO t_kbed.
APPEND t_kbed.
CHECK resb_x = cloi_x.
GET ioopcomp.
do not transfer RESB entries with deletion flag
CHECK ioopcomp-xloek IS INITIAL.
MOVE-CORRESPONDING ioopcomp TO t_resb.
APPEND t_resb.
CHECK afuv_x = cloi_x.
GET iosoper.
CLEAR t_kbeu. REFRESH t_kbeu.
MOVE-CORRESPONDING iosoper TO t_afuv.
check if control key (STEUS) should not be selected.
control_key_ok = cloi_x.
IF no_entry_for_logsys IS INITIAL.
READ TABLE t_steus WITH KEY
steus = iooper-steus BINARY SEARCH.
IF sy-subrc <> 0.
CLEAR control_key_ok.
ENDIF.
ENDIF.
CHECK NOT control_key_ok IS INITIAL.
GET iosoper LATE.
t_afuv-t_kbeu = t_kbeu[].
APPEND t_afuv.
IF jstv_x = cloi_x.
t_objnr-objnr = iosoper-objnr.
APPEND t_objnr.
ENDIF.
CHECK kbeu_x = cloi_x.
GET iosocap.
MOVE-CORRESPONDING iosocap TO t_kbeu.
APPEND t_kbeu.
*& Event END-OF-SELECTION
END-OF-SELECTION.
*MOD-006
DATA: itab_matnr TYPE zzzz_xref_data OCCURS 0.
DATA: l_wa_matnr TYPE zzzz_xref_data.
DATA: l_wa_matnr_value TYPE zzzz_xref_data-z_in_value.
DATA: l_wa_afko TYPE cloi_afko_struct.
SELECT *
FROM zzzz_xref_data
APPENDING TABLE itab_matnr
WHERE trans_id = 'ZELCUSMATLOOKUP' AND
( z_in_value IN s_matnr OR
z_out_value IN s_matnr ).
IF sy-subrc = 0.
LOOP AT ITAB_MATNR INTO L_WA_MATNR.
L_WA_MATNR_VALUE = L_WA_MATNR-z_OUT_VALUE.
S_MATNR-LOW = L_WA_MATNR_VALUE.
S_MATNR-SIGN = 'I'.
S_MATNR-OPTION = 'EQ'.
APPEND S_MATNR.
ENDLOOP.
DELETE itab_matnr WHERE NOT in_value IN s_emat.
SORT itab_matnr BY out_value.
ENDIF.
CLEAR: l_wa_matnr.
**MOD-010
Data which is not in the material lookup table but in the T_AFKO.
LOOP AT t_afko INTO l_wa_afko.
READ TABLE S_MATNR WITH KEY LOW = L_WA_AFKO-MATNR BINARY SEARCH.
READ TABLE itab_matnr INTO l_wa_matnr
WITH KEY z_out_value = l_wa_afko-matnr BINARY SEARCH.
IF sy-subrc NE 0.
l_wa_afko-rgekz = 'X'.
MODIFY t_afko FROM l_wa_afko TRANSPORTING rgekz.
ENDIF.
IF NOT P_DATE IS INITIAL.
IF T_AFKO-GSTRP < p_date OR
( T_AFKO-GSTRP = p_date AND
T_AFKO-GSUZP > p_time ).
L_WA_AFKO-RGEKZ = 'X'.
MODIFY T_AFKO FROM L_WA_AFKO TRANSPORTING RGEKZ.
ENDIF.
ENDIF.
ENDLOOP.
Delete Data which is not in the material lookup
table but in the T_AFKO.
DELETE t_afko WHERE rgekz = 'X'.
*MOD-010
*MOD-006
BEGIN OF INSERTION DS001
DATA: l_wa_itab_date TYPE ty_date.
Check whether the process order has been changed since the last
run of the program
CLEAR f_continue.
IF NOT t_afko IS INITIAL.
SELECT aufnr aedat aezeit erdat erfzeit loekz
INTO TABLE itab_date
FROM aufk
FOR ALL ENTRIES IN t_afko
WHERE aufnr = t_afko-aufnr.
IF sy-subrc = 0.
IF NOT p_date IS INITIAL.
CLEAR: itab_date.
Check whether the process order has been changed since the last
run of the program
LOOP AT itab_date INTO l_wa_itab_date.
if the CHANGED date is greater than the last run or initial
IF l_wa_itab_date-aedat GT p_date OR
( l_wa_itab_date-aedat IS INITIAL AND
l_wa_itab_date-aezeit IS INITIAL ).
if the CHANGED date is initial check the creation date
IF l_wa_itab_date-aedat IS INITIAL.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF l_wa_itab_date-erdat GT p_date OR
( l_wa_itab_date-erdat EQ p_date AND
l_wa_itab_date-erfzeit GE p_time ).
f_continue = 'X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
ENDIF.
ELSE.
f_continue = 'X'.
ENDIF.
if the CHANGED dat is not initial check it against the last run
ELSEIF l_wa_itab_date-aedat EQ p_date AND
l_wa_itab_date-aezeit GE p_time.
f_continue ='X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
ENDIF.
ENDLOOP.
*MOD-006
ELSE.
CLEAR: ITAB_DATE.
LOOP AT ITAB_DATE INTO L_WA_ITAB_DATE.
if the CHANGED date is greater than the last run or initial
IF L_WA_ITAB_DATE-AEDAT GT P_RUNDT OR
( L_WA_ITAB_DATE-aedat is initial and
L_WA_ITAB_DATE-aezeit is initial ).
if the CHANGED date is initial check the creation date
if l_wa_itab_date-aedat is initial.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF L_WA_ITAB_DATE-ERDAT GT P_RUNDT OR
( L_WA_ITAB_DATE-ERDAT EQ P_RUNDT AND
L_WA_ITAB_DATE-ERFZEIT GE S_RUNTM-LOW OR
L_WA_ITAB_DATE-ERFZEIT LE S_RUNTM-HIGH ).
f_continue = 'X'.
else.
l_wa_itab_date-indicator = 'X'.
MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
TRANSPORTING INDICATOR.
endif.
else.
f_continue = 'X'.
endif.
if the CHANGED dat is not initial check it against the last run
ELSEIF L_WA_ITAB_DATE-AEDAT EQ P_RUNDT AND
L_WA_ITAB_DATE-AEZEIT GE S_RUNTM-LOW.
f_continue ='X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
TRANSPORTING INDICATOR.
endif.
ENDLOOP.
*MOD-006
ENDIF.
ENDIF.
ENDIF.
DELETE ITAB_DATE WHERE INDICATOR = 'X'.
*MOD-006
CLEAR: itab_date.
IF s_rundt-high IS INITIAL AND NOT s_rundt IS INITIAL.
s_rundt-high = sy-datum.
ENDIF.
LOOP AT itab_date INTO l_wa_itab_date.
IF NOT s_rundt IS INITIAL.
if the CHANGED date is greater than the last run or initial
IF ( l_wa_itab_date-aedat IS INITIAL AND
l_wa_itab_date-aezeit IS INITIAL ).
if the CHANGED date is initial check the creation date
IF l_wa_itab_date-aedat IS INITIAL.
if the creation date is greater than or equal to the date of the last
run, if it is equal the creation time must be later or equal to the
start time of the last run
IF ( l_wa_itab_date-erdat GT s_rundt-low AND
l_wa_itab_date-erfzeit GT s_runtm-low ) AND
( l_wa_itab_date-erdat LT s_rundt-high AND
l_wa_itab_date-erfzeit LT s_runtm-high ).
f_continue = 'X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY itab_date FROM l_wa_itab_date
TRANSPORTING indicator.
ENDIF.
ELSE.
f_continue = 'X'.
ENDIF.
if the CHANGED dat is not initial check it against the last run
ELSEIF ( l_wa_itab_date-aedat GE s_rundt-low AND
l_wa_itab_date-aezeit GE s_runtm-low ) AND
( l_wa_itab_date-aedat LE s_rundt-high AND
l_wa_itab_date-aezeit LE s_runtm-high ).
f_continue ='X'.
ELSE.
l_wa_itab_date-indicator = 'X'.
MODIFY itab_date FROM l_wa_itab_date
TRANSPORTING indicator.
ENDIF.
ENDIF.
ENDLOOP.
DELETE itab_date WHERE indicator = 'X'.
*MOD-006
**MOD-006
LOOP AT t_afko INTO l_wa_afko.
READ TABLE itab_date INTO l_wa_itab_date
WITH KEY aufnr = l_wa_afko-aufnr BINARY SEARCH.
IF sy-subrc NE 0.
l_wa_afko-rgekz = 'X'.
MODIFY t_afko FROM l_wa_afko TRANSPORTING rgekz.
ENDIF.
ENDLOOP.
DELETE t_afko WHERE rgekz = 'X'.
**MOD-006
-> initialize logical data base to reduce memory consumption
PERFORM ldb_process_init(sapdbioc)
CHANGING
lv_subrc.
--> add information to the order structure that is not
selected via logical database:
- if AFVO-entry is a phase (phflg) --> fill field for
corresponding operation number (PVZNR)
The internal node number (aplzl) of the corresponding operation
is in field PVZKN of the phase
- relationship information: E1AFABL
especially: select external numbers for the used
internal numbers in the table AFAB
- status information of the order header: E1JSTKL
- status information of the operation: E1JSTVL
--> Put matnr and ltrmi in the table t_afko
SORT t_afko BY aufnr.
LOOP AT help_afpo.
READ TABLE t_afko WITH KEY aufnr = help_afpo-aufnr
ASSIGNING -gltri = help_afpo-ltrmi.
ENDIF.
ENDLOOP.
--> Select entries for order and operation status
IF NOT t_objnr[] IS INITIAL.
SELECT objnr stat FROM jest INTO TABLE t_jest2
FOR ALL ENTRIES IN t_objnr
WHERE objnr = t_objnr-objnr
AND inact <> 'X'.
ENDIF.
--> Select entries for relationships from afab for all orders
into table t_afab_tmp
SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
IF afab_x = cloi_x AND NOT t_aufpl_aufnr[] IS INITIAL.
-> select afab data
SELECT * FROM afab INTO TABLE t_afab_tmp
FOR ALL ENTRIES IN t_aufpl_aufnr
WHERE aufpl_vor = t_aufpl_aufnr-aufpl.
SELECT * FROM afab APPENDING TABLE t_afab_tmp
FOR ALL ENTRIES IN t_aufpl_aufnr
WHERE aufpl_nch = t_aufpl_aufnr-aufpl.
SORT t_afab_tmp
BY aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
DELETE ADJACENT DUPLICATES FROM t_afab_tmp
COMPARING aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
-> read external order numbers out of data base
CLEAR t_aufpl. REFRESH t_aufpl.
LOOP AT t_afab_tmp ASSIGNING -aufpl_nch.
COLLECT t_aufpl.
ENDLOOP.
CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
IF NOT t_aufpl[] IS INITIAL.
SELECT aufpl aufnr FROM afko INTO TABLE t_aufpl_aufnr
FOR ALL ENTRIES IN t_aufpl
WHERE aufpl = t_aufpl-aufpl.
SORT t_aufpl_aufnr BY aufpl.
ENDIF.
-> add order numbers to afab data
LOOP AT t_afab_tmp ASSIGNING -aufnr_nch = t_aufpl_aufnr-aufnr.
ENDIF.
ENDLOOP.
-> read operation numbers out of data base
CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
LOOP AT t_afab_tmp ASSIGNING -aplzl_nch.
COLLECT t_aufpl_aplzl.
ENDLOOP.
IF NOT t_aufpl_aplzl[] IS INITIAL.
SELECT aufpl aplzl vornr FROM afvc
APPENDING TABLE t_aufpl_aplzl_vornr
FOR ALL ENTRIES IN t_aufpl_aplzl
WHERE aufpl = t_aufpl_aplzl-aufpl
AND aplzl = t_aufpl_aplzl-aplzl.
SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
ENDIF.
-> add operation numbers to afab data
LOOP AT t_afab_tmp ASSIGNING -vornr_nch = t_aufpl_aplzl_vornr-vornr.
ENDIF.
ENDLOOP.
ENDIF. "afab_x
--> fill AFAB (relationship information) and status information
SORT t_aufpl_aufnr BY aufnr.
LOOP AT t_afko ASSIGNING .
-> fill order head status information
IF jstk_x = cloi_x.
CLEAR t_jstk. REFRESH t_jstk.
LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstk = t_jstk[].
ENDIF.
-> fill afab information
IF afab_x = cloi_x.
CLEAR t_aufpl_aufnr.
READ TABLE t_aufpl_aufnr WITH KEY
aufnr = -t_afab = t_afab[].
ENDIF.
-> fill operation and suboperation status information
IF jstv_x = cloi_x OR afvo_x = cloi_x.
LOOP AT .
-> read status information of suboperation
IF jstu_x = cloi_x.
LOOP AT -t_jstu = t_jstu[].
ENDLOOP.
ENDIF.
-> read status information of operation
IF jstv_x = cloi_x.
CLEAR t_jstv. REFRESH t_jstv.
LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstv = t_jstv[].
ENDIF.
-> Read operation for a phase
IF NOT -pvznr = t_aufpl_aplzl_vornr-vornr.
ENDIF.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDIF.
-> collect order numbers
CLEAR wa_aufnrdone.
wa_aufnrdone-low = -aufnr.
APPEND wa_aufnrdone TO lt_aufnrdone.
ENDLOOP.
-> append collected order numbers to global table
APPEND LINES OF lt_aufnrdone TO gt_aufnrdone.
EXPORT gt_aufnrdone TO MEMORY ID 'LOIAUFNRTAB'.
-> free large tables
CLEAR t_jest2. REFRESH t_jest2.
CLEAR t_afab_tmp. REFRESH t_afab_tmp.
CLEAR t_aufpl. REFRESH t_aufpl.
CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
CLEAR t_aufpl_aplzl_vornr. REFRESH t_aufpl_aplzl_vornr.
-> create idocs
CALL FUNCTION 'CLOI_MASTERIDOC_CREATE_LOIPRO'
EXPORTING
opt_sys = opt_sys
message_type = mestyp
TABLES
order_data = t_afko
EXCEPTIONS
OTHERS = 1.
-> export already selected order numbers via ranges tab to memory
EXPORT t_aufnr_range_done TO MEMORY ID 'LOI002'.
**MOD-006
IMPORT created_masteridocs_pro FROM MEMORY ID 'YLOI001'.
ycloidownlprot-end_date = sy-datum.
ycloidownlprot-end_time = sy-uzeit.
ycloidownlprot-idocs_selected = created_masteridocs_pro.
ycloidownlprot-in_progress = cloi_false.
insert or update entry (dependant if entry already exists)
MODIFY ycloidownlprot.
COMMIT WORK.
MESSAGE i967(z001) WITH created_masteridocs_pro.
**MOD-006
Update last run date and time
IF p_update = 'X'.
PERFORM update_last_run.
ELSE.
MESSAGE s000 WITH text-022.
"Last Run Date and Last Run Time not updated
LEAVE LIST-PROCESSING.
ENDIF.
INCLUDE rcordf01.
*& Form validate_last_run_date_time
text
--> p1 text
<-- p2 text
*FORM validate_last_run_date_time.
IF p_date IS INITIAL OR
p_time IS INITIAL.
IF sy-batch IS INITIAL.
MESSAGE s000 WITH text-017.
"Last Run date & Last Run Time can not be blank
LEAVE LIST-PROCESSING.
ELSE.
MESSAGE e000 WITH text-017.
"Last Run date & Last Run Time can not be blank
ENDIF.
ENDIF.
*ENDFORM. " validate_last_run_date_time
*& Form update_last_run
text
--> p1 text
<-- p2 text
FORM update_last_run.
CONSTANTS:
l_c_name TYPE rvari_vnam VALUE 'Z_PROC_DATE',
l_c_name1 TYPE rvari_vnam VALUE 'Z_PROC_TIME',
l_c_type TYPE rsscr_kind VALUE 'P',
l_c_numb TYPE tvarv_numb VALUE '0000'.
Update last run date
UPDATE tvarv SET low = sy-datum
WHERE name = l_c_name AND
type = l_c_type AND
numb = l_c_numb.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
g_run_date = text-015. "#EC
"Updation of TVARV table failed for ZLAST_RUN_DATE. Update manually
ENDIF.
Update last run time
UPDATE tvarv SET low = sy-uzeit
WHERE name = l_c_name1 AND
type = l_c_type AND
numb = l_c_numb.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
g_run_time = text-016. "#EC
"Updation of TVARV table failed for ZLAST_RUN_TIME. Update manually
ENDIF.
ENDFORM. " update_last_run -
SO from PO using idocs --same sap client
Hello SAP Gurus,
We need help with the following .
The requirement is we need to create the Sales order from Purchase order using idocs within the same client .
We created the partner profile of the customer and the vendor .
Customer ---maintained an inbound parameters with message type ORDERS and process code ORDE
Vendor -
maintained outbound parameters with message type ORDERS and idoc type ORDERS05 and process code ME10 .
Now when we create the PO and check the status in WE02 we get the error status 56 , EDI: Partner profile inbound not available.
What could be the posible cause of the error .
Anybody with some suggestions and solutions .
Thanks
HoneyHi,
>>>Now when we create the PO and check the status in WE02 we get the error status 56 , EDI: Partner profile inbound not available.
this means that the partner profile was not created correctly
I'd suggest using logical system as a partner profile
my book contains PO and SO partner profile creation
http://www.sappress.com/product_basic.cfm?account=&product=H3059
Regards,
Michal Krawczyk -
Missing part check functionaliy at the time of GR when using IDOCS
Hi All,
We are using IDOCs to record the the Good Receipt for the Purchase Orders.
Then a BAPI is called to post the GR.
There is a functionality for missing parts checks which can be activated at the time of GR which checks the ATP & sends mail to MRP controller.
When we directly use the MIGO, then missing part check is activated & a mail is sent to MRP controller.
If we use the IDOC to post the GR, the missing part check is not activated & mhence mail is not sent to MRP controller.
Pl let us know if there is a way by which we can activate the missing part check in GR using IDOCS.
Regards
VineetHi,
The G/L accounts which you give in the PO will be Debited & your vendor A/c will be crdtd at the time of LIV.
Thanks & Regards,
Maybe you are looking for
-
Error when deploying JDeveloper 11.1.1.3.0 to WebLogic 10.3
Hi All, Trying to migrate an existing web application which was running on the old Oracle App Server to WebLogic 10.3. In the process upgraded Hibernate, Spring etc. other libraries. Left the existing Strut 1.1 alone. Getting the following error duri
-
F110 Payment to vendor with several bank accounts
Hi to all, I have a vendor with 2 bank accounts, each one for its subisidiaries . We pay this vendor's head office via transfer and to do so, use transaction F110. Depending on the subsidiary, our vendor wants us to use one account or the other. All
-
Spool to PDF - Problems with downloading PDF file when converting with job
Hi all! I've got a problem. I've got a program that writes a smartform into the spool. After that, I am using the function modules RSTS_GET_ATTRIBUTES and CONVERT_OTFSPOOLJOB_2_PDF to convert it into PDF. I retrieve a internal table with the binary c
-
Wrong file naming on latest installation ISO
Hi all. I whose trying to install Arch from latest installation ISO without any success. I whose thinking that whose problem with UEFI and USB combination, similar to this Boot USB installation as EFI I've whose getting same output as on this screens
-
Is there any standard ODS for Contract (value type and quantity type)?
We know that in MM, contract records can be categorized into two different categories, Value type and Quantiy type. We are trying to see if there is any Contract ODS in business content that we can install which can take care of these two types of c