Scheduling BAPi
Hi guys,
While scheduling a BAPI(ZBAPI_WS_REPORT ),am gettin an error msg says Program ZBAPI_WS_REPORT is invalid or does not exist,even though it exists in the target client.What could be the problem?Please help me out in this regard asap.Its very urgent.
Surely points vl b rewarded.
Warm Regards,
Mohandoss P.
You need to call that BAPI into your report and then you have schedule that report.
I hope it helps.
Let me know if any doubts.
Thanks,
Vibha
Please mark all the useful answers
Similar Messages
-
Exception from InfoPackage.Schedule BAPI
Hi all,
I'm working on a BW integration project, using the Staging BAPIs for the BIW from the .NET Connector. I have been able to create the InfoObjects, InfoCubes, etc... however I am running into a problem I just can't get around. I am trying to schedule an InfoPackage to upload data in a csv file on my workstation. However, when I call the Schedule BAPI (BAPI_IPAK_START), I get an exception that doesn't make much sense to me: "An upload from the client workstation in the background is not possible". I'm not using a background thread, so I'm a little confused where this comes from. If I schedule the package from the BW Administrator, it schedules and uploads with no problems. Does anyone have any idea where I may be going wrong here?
Thanks,
SteveI am also having the same problem. Can anyone help?
The only difference is so far, I am only testing it from SAP GUI ( i.e calling BAPI functions from ABAP code)
Message was edited by: Saurabh Gupta -
Scheduled BAPI execution from Portal
Hi,
I have scenario where i need to update my application database table from SAP R/3 on a periodic basis. I need to know
1) Is there a scheduler in default portal (EP7,SP11)
2) Can BAPIs be called through scheduler? Can we have a webdynpro component which has BAPI model and can be executed at a regular intervals?
regards,
SujeshHi
1. Yes, there is scheduler service. Go to
System Administration -> System configuration -> Content Management
Configuration ->Global Services -> Scheduler Service
More :
http://help.sap.com/saphelp_nw2004s/helpdata/en/3a/bc37b5789dee4eaa8005bff84f14cf/frameset.htm
2. You can write 'portal service' which will execute BAPI function through Connector Framework
SAP NetWeaver Scheduler for Java
http://help.sap.com/saphelp_nw04/helpdata/en/89/8a185c148e4f6582560a8d809210b4/content.htm
Regards
Jakub Krecicki -
Hi,
How to schedule BAPI in Background mode.
Thanks in advance.
Regards,
MadhaviHi,
When you create a batch input session, it remains in the batch input queue until it is explicitly started. Session processing can be started in two ways:
An on-line user can start the session using the batch input menu options. (To access the batch input options, choose System>Services>Batch Input.)
You can submit the background job RSBDCSUB to start a session in background processing. If several sessions have the same name, RSBDCSUB starts them all.
It's possible to coordinate the generation and execution of a session in the background processing system.
You can, for example, schedule both the batch input program and RSBDCSUB in the background. If you designate the batch input job as the predecessor for RSBDCSUB, then RSBDCSUB will be started automatically when the batch input job successfully completes.
Alternatively, you can schedule both the batch input program and RSBDCSUB as job steps in a single background job. In this case, however, RSBDCSUB is started even if the batch input program should terminate abnormally.
Hope this will help you.
Regards:
Alok -
Deletion of Scheduling Agreement and Delivery Schedule using BAPI
Hi SAP MM Gurus,
Please assist in inquiry below:
My scenario is that I am trying to delete delivery schedules and scheduling lines using BAPIs. I have no issues when there is no GR made yet for the delivery schedules. The error arises when there are already existing Goods Receipts and Invoices for the schedule line that I wish to delete
When using the BAPIs (either BAPI_SAG_CHANGE or BAPI_SCHEDULE_MAINTAIN), I set the deletion indicator to "L" and set to X all change relevant fields (i.e. DELETION_INDX). However, whenever I execute it, I get the error message 06088. The funny thing is both the Quantities and the delivered quantities that are normally populated are left blank.
For example:
Normal error for 06088:
Quantity 100.0 smaller than quantity delivered 179.0
Error using BAPI with deletion indicator:
Quantity smaller than quantity delivered
Is this a bug of the BAPI? or am I just missing some settings?
Your immediate response is appreciated
Regards,
DeLoHi,
Please find the below link check the setting are correct or not
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a02cb00a-bfb4-2c10-98aa-e33e7f64ba28?quicklink=index&overridelayout=true
Reagrds,
Pramod -
REPORT ZIND_BACKGROUND_JOB MESSAGE-ID zsd
NO STANDARD PAGE HEADING
LINE-SIZE 160.
Tables
TABLES: mara,mvke.
Data Definitions.
TYPES: BEGIN OF ty_mat,
matnr TYPE mara-matnr,
vkorg TYPE mvke-vkorg, " Sales Org
vtweg TYPE mvke-vtweg, " Dist. Channel
prdha TYPE mara-prdha, " Prod Hierarchy
err(60) TYPE C,
END OF ty_mat.
DATA: gt_matnr TYPE STANDARD TABLE OF ty_mat WITH HEADER LINE,
gt_matnr_err TYPE STANDARD TABLE OF ty_mat WITH HEADER LINE.
DATA: gs_matnr_err TYPE ty_mat.
DATA: lv_file_name TYPE string,
lv_message(200) TYPE c.
DATA : JN(8) TYPE C,
val(1) .
DATA: PRIPAR TYPE PRI_PARAMS,
ARCPAR TYPE ARC_PARAMS.
For BAPI
DATA: headdata TYPE bapimathead,
clientdata TYPE bapi_mara,
clientdatax TYPE bapi_marax,
return TYPE bapiret2,
salesdata TYPE bapi_mvke,
salesdatax TYPE bapi_mvkex.
DATA: ret TYPE STANDARD TABLE OF bapi_matreturn2 WITH HEADER LINE.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b001 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_matnr FOR mara-matnr,
s_vkorg FOR mvke-vkorg OBLIGATORY,
s_vtweg FOR mvke-vtweg OBLIGATORY,
s_matkl FOR mara-matkl.
SELECTION-SCREEN END OF BLOCK b001.
SELECTION-SCREEN BEGIN OF BLOCK b002 WITH FRAME TITLE text-002.
PARAMETERS: p_err TYPE localfile OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b002.
SELECTION-SCREEN BEGIN OF BLOCK b003 WITH FRAME TITLE text-003.
PARAMETERS: P_FORE RADIOBUTTON GROUP rad,
P_BACK RADIOBUTTON GROUP rad.
SELECTION-SCREEN: END OF BLOCK b003.
PARAMETERS : P_JOB LIKE TBTCJOB-JOBNAME.
At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_err.
PERFORM get_filename USING 'Output - Error File'
CHANGING p_err.
AT SELECTION-SCREEN ON BLOCK B003.
IF P_BACK = 'X' AND P_JOB NE SPACE.
PERFORM PRINTER_GET.
PERFORM JOB_OPEN.
PERFORM JOB_SUMBIT.
PERFORM JOB_CLOSE.
STOP.
ELSEIF P_JOB = SPACE AND P_BACK = 'X' .
MESSAGE 'Enter The Job Name' type 'I'.
ENDIF.
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM 100_collect_dbrecs.
PERFORM 200_process_dbrecs.
END-OF-SELECTION.
*& TOP-OF-PAGE.
TOP-OF-PAGE.
WRITE: 40 'Material Product Hierarchy Update Report'.
ULINE (115).
*SKIP.
WRITE: /'MATERIAL'.
WRITE: /.
ULINE (115).
*& Form 100_collect_dbrecs
FORM 100_collect_dbrecs .
SELECT maramatnr mvkevkorg mvkevtweg maraprdha
INTO CORRESPONDING FIELDS OF TABLE gt_matnr
FROM mara INNER JOIN mvke
ON maramatnr = mvkematnr
WHERE mara~matnr IN s_matnr
AND mara~prdha NE space
AND mara~matkl IN s_matkl
AND mara~lvorm EQ space
AND mvke~vkorg IN s_vkorg
AND mvke~vtweg IN s_vtweg
AND mvke~prodh EQ space.
ENDFORM. " 100_collect_dbrecs
*& Form 200_process_dbrecs
FORM 200_process_dbrecs.
IF gt_matnr[] IS INITIAL.
MESSAGE s000 WITH 'No Materials Processed.'.
ELSE.
LOOP AT gt_matnr.
CLEAR: headdata,
clientdata,
clientdatax,
return,
salesdata ,
salesdatax,
ret.
REFRESH: ret.
Filling Material.
MOVE: gt_matnr-matnr TO headdata-material,
'X' TO headdata-sales_view.
Sales Org
MOVE: gt_matnr-vkorg TO salesdata-sales_org,
gt_matnr-vkorg TO salesdatax-sales_org.
*Dist Channel
MOVE: gt_matnr-vtweg TO salesdata-distr_chan,
gt_matnr-vtweg TO salesdatax-distr_chan.
*Prod Hierarchy
MOVE: gt_matnr-prdha TO salesdata-prod_hier,
'X' TO salesdatax-prod_hier.
PERFORM 220_bapi_call.
CLEAR: gt_matnr.
ENDLOOP.
Download Error Files
IF gt_matnr_err[] IS INITIAL.
no errors to be downloaded
ELSE.
Error File being downloaded.
lv_file_name = p_err.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_file_name
filetype = 'ASC'
TABLES
data_tab = gt_matnr_err
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 99.
IF sy-subrc = 0.
WRITE: /05 'Error File Download - Successful.'.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO lv_message.
FORMAT INTENSIFIED ON.
WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " 200_process_dbrecs
*& Form 220_BAPI_CALL
FORM 220_bapi_call .
DATA: lv_message(60) TYPE c.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = headdata
clientdata = clientdata
clientdatax = clientdatax
salesdata = salesdata
salesdatax = salesdatax
IMPORTING
return = return
TABLES
returnmessages = ret.
IF sy-subrc EQ 0.
MOVE : return-message TO lv_message.
IF return-type EQ 'E'.
WRITE: / gt_matnr-matnr,
'Change Failed -', lv_message.
MOVE-CORRESPONDING gt_matnr TO gs_matnr_err.
APPEND gs_matnr_err to gt_matnr_err. CLEAR gs_matnr_err.
ELSE.
WRITE: / gt_matnr-matnr,
'Change Successful -', lv_message, ' for ', gt_matnr-vkorg,' ', gt_matnr-vtweg.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
COMMIT WORK.
ENDIF.
ENDIF.
ENDFORM. " 220_BAPI_CALL
*& Form get_filename
Call up a dialog window to retrieve the filename
--> P_FILETITLE Dialog file title
<-- P_FILENAME FIle name retrieved
FORM get_filename USING p_filetitle TYPE c
CHANGING p_filename TYPE localfile.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = ' '
def_path = ' '
mask = ',.,..'
mode = 'O'
title = p_filetitle
IMPORTING
filename = p_filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
ENDFORM. " get_filename
*& Form JOB_OPEN
BACK GROUND JOB ASSIGNING JOB NAME AND IMPORTING JOB NUMBER
form JOB_OPEN .
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
jobname = P_JOB
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
JOBCLASS =
IMPORTING
JOBCOUNT = JN
CHANGING
RET =
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
INTO lv_message.
FORMAT INTENSIFIED ON.
WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
endform. " JOB_OPEN
*& Form JOB_SUMBIT
SUBMITTING THE JOB
form JOB_SUMBIT .
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
authcknam = SY-UNAME
COMMANDNAME = ' '
OPERATINGSYSTEM = ' '
EXTPGM_NAME = ' '
EXTPGM_PARAM = ' '
EXTPGM_SET_TRACE_ON = ' '
EXTPGM_STDERR_IN_JOBLOG = 'X'
EXTPGM_STDOUT_IN_JOBLOG = 'X'
EXTPGM_SYSTEM = ' '
EXTPGM_RFCDEST = ' '
EXTPGM_WAIT_FOR_TERMINATION = 'X'
jobcount = JN
jobname = P_JOB
LANGUAGE = SY-LANGU
PRIPARAMS = pripar
REPORT = SY-REPID
VARIANT = ' '
IMPORTING
STEP_NUMBER =
EXCEPTIONS
BAD_PRIPARAMS = 1
BAD_XPGFLAGS = 2
INVALID_JOBDATA = 3
JOBNAME_MISSING = 4
JOB_NOTEX = 5
JOB_SUBMIT_FAILED = 6
LOCK_FAILED = 7
PROGRAM_MISSING = 8
PROG_ABAP_AND_EXTPG_SET = 9
OTHERS = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
INTO lv_message.
FORMAT INTENSIFIED ON.
WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
submit ZIND_BACKGROUND_JOB
via job p_JOB
number JN
to sap-spool without spool dynpro
spool parameters PRIPAR
and return.
*SUBMIT ZIND_BACKGROUND_JOB AND RETURN
*USER SY-UNAME " User for runtime authorizations
*VIA JOB p_JOB NUMBER JN
*" Job name and job number
*" from JOB_OPEN
*TO SAP-SPOOL " Print and archiving options from
*" GET_PRINT_PARAMETERS
*" Both sets of options come from
*" GET_PRINT_PARAMETERS
*SPOOL PARAMETERS PRIPAR
*ARCHIVE PARAMETERS ARCPAR
*WITHOUT SPOOL DYNPRO.
**End of Content Area
endform. " JOB_SUMBIT
*& Form JOB_CLOSE
text
form JOB_CLOSE .
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
AT_OPMODE = ' '
AT_OPMODE_PERIODIC = ' '
CALENDAR_ID = ' '
EVENT_ID = ' '
EVENT_PARAM = ' '
EVENT_PERIODIC = ' '
jobcount = JN
jobname = P_JOB
LASTSTRTDT = NO_DATE
LASTSTRTTM = NO_TIME
PRDDAYS = 0
PRDHOURS = 0
PRDMINS = 0
PRDMONTHS = 0
PRDWEEKS = 0
PREDJOB_CHECKSTAT = ' '
PRED_JOBCOUNT = ' '
PRED_JOBNAME = ' '
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
STRTIMMED = 'X'
TARGETSYSTEM = ' '
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
START_ON_WORKDAY_NR = 0
WORKDAY_COUNT_DIRECTION = 0
RECIPIENT_OBJ =
TARGETSERVER = ' '
DONT_RELEASE = ' '
TARGETGROUP = ' '
DIRECT_START =
IMPORTING
JOB_WAS_RELEASED =
CHANGING
RET =
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
INVALID_TARGET = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
INTO lv_message.
FORMAT INTENSIFIED ON.
WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
endform. " JOB_CLOSE
*& Form PRINTER_GET
text
form PRINTER_GET .
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
DESTINATION = 'LOCL'
IMMEDIATELY = ''
NO_DIALOG = 'X'
IMPORTING
out_archive_parameters = arcpar
OUT_PARAMETERS = PRIPAR
valid = val
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. " PRINTER_GET
<b>Actually this prog schedules a job and i can see it in SM37, but when i try to release it error i get is step is not defined properly....
What can be the possible causes of the errors.
here in my prog i have two parameters which is obligatory (VTWEG and VKORG).
Iam not submitting this parameter in the background jb, how to do this???
is it necessary for it to be scheduled in background.
Pls help me ASAP.</b>
Title was edited by:
Alvaro Tejada GalindoHi Naveen,
You are trying to submit the same program in background. You need to create 2 programs for that..
Create a program : ZBCKGD & inside it use FM JOB_SUBMIT & Pass program name as ZIND_BACKGROUND_JOB.
Export the selection criteria from ZBCKGD to ZIND_BACKGROUND_JOB.
Refer:/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job
form JOB_SUMBIT .
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
authcknam = SY-UNAME
COMMANDNAME = ' '
OPERATINGSYSTEM = ' '
EXTPGM_NAME = ' '
EXTPGM_PARAM = ' '
EXTPGM_SET_TRACE_ON = ' '
EXTPGM_STDERR_IN_JOBLOG = 'X'
EXTPGM_STDOUT_IN_JOBLOG = 'X'
EXTPGM_SYSTEM = ' '
EXTPGM_RFCDEST = ' '
EXTPGM_WAIT_FOR_TERMINATION = 'X'
jobcount = JN
jobname = P_JOB
LANGUAGE = SY-LANGU
PRIPARAMS = pripar
<b>REPORT = 'ZIND_BACKGROUND_JOB'</b>
VARIANT = ' '
IMPORTING
STEP_NUMBER =
EXCEPTIONS
BAD_PRIPARAMS = 1
BAD_XPGFLAGS = 2
INVALID_JOBDATA = 3
JOBNAME_MISSING = 4
JOB_NOTEX = 5
JOB_SUBMIT_FAILED = 6
LOCK_FAILED = 7
PROGRAM_MISSING = 8
PROG_ABAP_AND_EXTPG_SET = 9
OTHERS = 10
IF -
Change schedule lines using bapi salesorder_change
Hello,
I am using 'SD_SALESDOCUMENT_CHANGE' to change sales order. schedule lines are not changed.
I get an express inbox message saying :
===================================================================
Update was terminated
Error Info... 00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC
======================================================================
I don't know what to do.
any body solved this problem? what is wrong in the way I wrote it?
Thanks in advanced ,
Sara
I populate schedule lines this way:
lv_schedule-itm_number = svbap-posnr.
lv_schedule-sched_line = '0001'.
lv_schedule-req_qty = svbap-kwmeng.
lv_schedule-req_date = im_vbak-vdatu.
move im_vbak-vdatu to: lv_schedule-tp_date,
lv_schedule-ms_date,
lv_schedule-load_date,
lv_schedule-gi_date.
append lv_schedule to et_schedule.
* schedule lines X
lv_schedulex-itm_number = svbap-posnr.
lv_schedulex-sched_line = '0001'.
lv_schedulex-updateflag = 'U'.
lv_schedulex-req_qty = 'X'.
lv_schedulex-req_date = 'X'.
move 'X' to: lv_schedulex-tp_date,
lv_schedulex-ms_date,
lv_schedulex-load_date,
lv_schedulex-gi_date.
append lv_schedulex to et_schedulex.Hi,
The function I use is the one used in the BAPI CHANGE.
Online changing the delivery date changes the date in the schedule lines.
I can't understand why it is not updated.
Sara -
BAPI to read and change schedule lines in APO
Hello experts,
We want to firm schedule lines inside the firm zone of the APO procurement scheduling agreements with a daily job. For this we are trying to use BAPI BAPI_POSRVAPS_GETLIST3 and BAPI_POSRVAPS_SAVEMULTI3. The getlist one does not return schedule lines, it returns purchase orders and purchase requisitions. Are these the right bapis to read and change schedule lines in APO? or is there anyother one we can use?
Thanks and regards,
ErgulHi,
You can use the below code to read the schedule lines.
Checking a session exists
CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
IMPORTING
ev_simsession = gv_sims
es_gen_params = gv_params.
If not create a new session and read it
IF gv_sims IS INITIAL.
CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_CREATE'
IMPORTING
ev_simsession = gv_sims.
CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
IMPORTING
ev_simsession = gv_sims
es_gen_params = gv_params.
g_cre_chk = 'X'.
ENDIF.
CALL FUNCTION '/SAPAPO/CMDS_TPSRC_GET'
EXPORTING
iv_ebeln = p_l_t_acknh_ebeln
iv_ebelp = p_l_t_acknh_ebelp
TABLES
et_tpsrc_all = lt_tpsrc
EXCEPTIONS
matid_not_found = 1
locfrom_not_found = 2
locto_not_found = 3
scheduling_agreement_not_found = 4
error_selecting_schedagreement = 5
OTHERS = 6.
IF sy-subrc = 0.
reading the scheduling agreement records
READ TABLE lt_tpsrc INTO ls_tpsrc INDEX 1.
CALL FUNCTION '/SAPAPO/PWB_BZQID_GET_ORDER'
EXPORTING
iv_simid = '000'
iv_bzqid = ls_tpsrc-bzqid
IMPORTING
ev_ordid = lv_iordid
EXCEPTIONS
lc_connect_failed = 1
no_elements = 2
unit_conversion_failed = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION '/SAPAPO/PWB_GET_RELATED_ORDERS'
EXPORTING
iv_ordid = lv_iordid
iv_order_type = '16'
iv_simid = '000'
IMPORTING
ev_ordid = lv_eordid
EXCEPTIONS
order_not_found = 1
lc_connect_failed = 2
no_elements = 3
OTHERS = 4.
IF sy-subrc = 0.
APPEND lv_eordid TO lt_ordid.
CALL FUNCTION '/SAPAPO/DM_PO_READ'
EXPORTING
iv_simsession = gv_sims
is_gen_params = gv_params
it_ordid = lt_ordid
IMPORTING
et_schedule = p_lt_sched
EXCEPTIONS
lc_connect_failed = 1
lc_com_error = 2
lc_appl_error = 3
OTHERS = 4.
ENDIF.
ENDIF.
ENDIF.
Use '/SAPAPO/CMDS_SNP_MM_ORD_MODIFY' function module to change the schedule lines (Pass '16' to iv_order_type parameter).
Let me know if u have any issues.
Regards,
Siva. -
BAPI for VA02 to check availability & update the Schedule lines
Hi Experts,
Is there a BAPI which can 'check item availability' & update the Schedule lines for the same order?
I have checked 'RV_AVAILABILITY_CHECK' 'BAPI_MATERIAL_AVAILABILITY' 'SD_BACKORDER_UPDATE'
but it is not solving the purpose.
Kindly give your suggestion for the same.
Thanks.Hi,
Please let me know if you were able to achieve this functionality. I have a similar requirement wherein I need to check for the material availability and update the schedule lines in the scheduling agreement. I checked the FM SD_BACKORDER_UPDATE, but it doesn't seem to be helpful.
Regards,
Dawood -
BAPI Error: No schedule lines due for delivery up to the selected date
Hi,
I have created a program to create delivery orders with reference to sales orders using BAPI - BAPI_OUTB_DELIVERY_CREATE_SLS.
After execution I get the error: No schedule lines due for delivery up to the selected date
Please help.
Thanks in advance!!!
Regards,
Sriramhi,
this is to inform you that,
please check the schedule line date in the sales order because the date is not matching here for the BAPI to upload.
here, for example the schedule line is 4 days after and you are running BAPI today. that will mismatch no.
the same thing is happening in uploading case also.
so please check the date.
because in teh sales order if teh schedule line date is today it will accept the uploading with out throwing any errors.
regards,
balajia -
BAPI/FM to change scheduling agreement's delivery status.
Hi All,
I have to check "Delivery completed" indicator of scheduling agreement.
I tried using BAPI_PO_CHANGE but it returns the message below:
"Not possible to process a scheduling agreement using this function"
Is there any other BAPI or FM to change the agreement.
I do not want to use batch-input. But if there is no other option I will.
Note: I am using system 4.6C
Thanks
Mandeephii
try using BAPI_AGREEMENT_MAINTAIN FM.
one another FM BAPI_SCHEDULE_MAINTAIN is used to create or change scheduling agreement delivery schedule lines.i hope any FM can help you.
regards
twinkal -
Change Scheduling Agreement and Info Record using Bapi
Hi Experts,
Can anybody say how to change the Scheduling agreement and Info Record using Bapi.
I use BAPI_AGREEMENT_MAINTAIN to change Scheduling Agreement .
But it does not changing Scheduling lines.Hi,
Please find the below link check the setting are correct or not
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a02cb00a-bfb4-2c10-98aa-e33e7f64ba28?quicklink=index&overridelayout=true
Reagrds,
Pramod -
BAPI for schedule lines (purchase scheduling agreement)
HI
Is there a BAPI available to create schedule lines in purchase scheduling agreements?
Is there any other way of creating schedule lines in purchase SAs via program?
Thanks in advance
SriramDear Sriram,
Please check BAPI_SAG_CREATE with SE37.
Regards,
w1n -
Schedule line confirming as 0 Qty when uploaded SO using BAPI
Hi Gurus,
Iam posting sales order from flat file using BAPI.
so the flat file is passing the schedule line date 31.01.2009
but the system is taking the current date as the delivery date that is because of the VOV8 setting.
but the issue here is that PGI and the A/c doc is also creating on 03.02.2009 date.
can I control it?
When I try to do a sale order manually, the schedule line takes the current date as default if i try to change it to date in past it is not confirming the quantity.
I removed that tick in that order type VOV8.
I dont mind if it takes the PGI date diffrent but the document date also it takes as the current date.
after that i created a SO manully and there in the schedule line for 31.01.09 confr quantity 0 and 3.02.09 confirmed the quantity
After removing the tick, I created manually a SO, and given delivery date 02.02.2009 but it is automatically taking 03.02.2009.
Please help me in this regard,
Regards,
AnbuCarried out backwards delivery scheduling indicates that the system is to carry out only backwards scheduling for all schedule lines in the sales document.
When changing a sales document, such as adding schedule lines or rescheduling, the system carries out delivery scheduling for all lines. In some cases, the system performs forward scheduling which may have the undesirable affect of rescheduling lines that have already been confirmed.
Marked this indicator to deactivate forward scheduling.
Note that when this indicator is set, the system may determine a material availability date that lies in the past. -
Error in creating schedule line aggrement through BAPI
Hi All ,
I want to create schedule line aggrement (VA31) by using BAPI / FM .
I am using " SD_SALESDOCUMENT_CREATE" FM .
Here i am getting error in output when i enter shchedle line data in input .
Error is given below .
E V1 434 No schedule line category could be determined during quantity adjustment
Error only come when i want to create new schedule line ....in Changing any schedule line aggrement there is no error .
I am able to create schedule line aggrement manually .
please help .Use BAPI_SAG_CREATE
Maybe you are looking for
-
Ipod not detected on itunes or by computer
hello, my computer suddenly isnt detecting my ipod. i know my usb cord is working because my ipod can charge but it wont show up in itunes. changing usb drives doesnt work. it doesnt show up on another computer either. its weird because it was workin
-
Hi Gurus, I was create a Grouping Key 02. This GK was stored in the master record of the vendor. But, does not work the way i expect it to. In the Grouping Key; in the frame of "Fields for grouping payments" i put only the field LIFNR. This means tha
-
Hi, I have to compare two float fields, one fetched from database and one passed as importing parameter. Now, i get "0.1" as a value in importing parameter for comparison. and the same is stored in the database, i.e. "0.1". But when I put a select qu
-
Forms problem in Window 7 64 bit
Dear Members I have installed "Forms [32 Bit] Version 10.1.2.0.2" on Windows 7 64bit. I have the Internet Explorer 9. Now when i run the forms it prompts for download jinit when i try to download it show the error dialog box as under Jinit.exe Cannot
-
Hi All, This is a repost but this time Ill be specific. How do I select from a table into a hashed table faster without using "select distinct"? my primary concern is the speed of the select statement, and im afraid I cannot get rid of the hashed tab