Function Module giving pruchase requisition release code ?
Hi everyone !!
I am using the FM BAPI_REQUISITION_RELEASE_GEN in order to realease a purchase requisition, this works well as I give it a hard-coded value for input parameter REL_CODE.
However in our company an intricate set of release strategies imposes that I should have a dynamic value for this release code.
So I've been looking for a function module that would return the possible values of the release codes with either the requisition number as input or other parameters found in table EBAN !
Anyone has any suggestions as to which FM or BAPI I could use to achieve this goal?
Best regards !
Ced
Even i passed only currency then also i got the below errors.
1-> No instance of object type PurchaseOrder has been created. External reference:
2-> PO header data still faulty
3-> No master record exists for vendor 100017
4-> Vendor 100017 does not exist
5-> Can delivery date be met?
how to rectify these errors. Is it any functional problem or data passing problem
header-comp_code = wa_dbtab-bukrs.
header-doc_type = wa_dbtab-bsart. "Standard Order
header-creat_date = sy-datum.
header-vendor = wa_dbtab-lifnr.
header-purch_org = wa_dbtab-ekorg.
header-pur_group = wa_dbtab-ekgrp.
header-currency = wa_dbtab-currency.
*POPULATE HEADER FLAG.
headerx-comp_code = c_x.
headerx-doc_type = c_x.
headerx-creat_date = c_x.
headerx-vendor = c_x.
headerx-purch_org = c_x.
headerx-pur_group = c_x.
headerX-currency = c_x.
headerX-currency_iso = c_x.
ENDIF.
*POPULATE ITEM DATA.
item-po_item = wa_dbtab-item.
item-material = wa_dbtab-matnr.
item-plant = wa_dbtab-werks.
item-matl_group = wa_dbtab-mat_grp.
item-quantity = wa_dbtab-menge.
item-net_price = wa_dbtab-netwr.
APPEND item.
CLEAR item.
*POPULATE ITEM FLAG TABLE
itemx-po_item = wa_dbtab-item.
itemx-po_itemx = c_x.
itemx-material = c_x.
itemx-plant = c_x .
itemx-matl_group = c_x.
itemx-quantity = c_x .
itemx-net_price = c_x.
APPEND itemx.
CLEAR itemx.
Similar Messages
-
Function Module to Reject PO Release
Hello All,
One can reject a PO Release using ME29N, does anybody know of a function module or sequence of function modules to achieve this ? The only BAPI available is for Release, but I couldnt find anything on rejecting release.
I havent tried a BDC, not sure if it will work with Enjoy Screens. Any experiences ?
Regards,
Parag.As per standard SAP practice, rejection is only possible for Purchase Requisitions only. Your requirement is called as release cancel.
There is only one function module available for both release and cancel and you can make use of the same:
EXIT_SAPLEBNF_005
Thanks,
Shree -
Function module WWW_ALV_CALL is not released for the Internet
Hi
I am facing this error Function module WWW_ALV_CALL is not released for the Internet and Only user SAP can release the function module.
Best Regards
GAGANhi,
This Web based calls are not available anymore in Netweaver 2004s/7.0.
More information in SAP-Note: 910202
Hope this helps
regards
Tobias -
How to find out the Functional module related to a T-code
Hi All ,
Please tell how to find out the Functional module related to a T-code.
i want it for the T-code RSZDELETE.Hi
There is no direct way to see this.
You need to Pick the Program(Se37/38) and tables (SE16/11)and to see where its been used
The FM for RSZDELETE is RSZ_DB_COMP_REORG_AS_POPUP.
Hope it helps -
Custom Function Module for the New Process Codes
I want to distribute the custom table data . For that i have written the program using MASTER_IDOC_DISTRIBUTE. I have created the custom message & idoc types along with their assignments.
I got struck up at the process code. I have to assign the function module for that process code. Can anyone kindly help me in writting the code at that function module ?Hi Friends,
My requirement is , i need to transfer the table records. For that i have created the Message/Idoc Types and also created the Partner profile and the Distribution model view .....all alll i have done.
My doubt is , in the we20, at the outbound parameters , i can give the Message/Idoc types that i have created. Ok thats fine
But at the inbound parameters, i have to give the inbound process code. So i have created the Inbound process code. As we know that for every process code a function module is attached, now i have to create the function module which posts the records in receiver side.
so 1. Does the Function module need to be RFC Enabled ?
2. Do we need to create Object type in SWO1 once i
create and release the function module ? -
Functional Module:Need some sample source code.
Hi All,
I have created a customized table u2018ZStock_Order_Dealeru2019 with the following fields:
Stock_Order_Dealer
Dealer Number
S2D order Number
Line item Number
Material Number
Ordered Quantity
Batch Number
Received Quantity
S2D from D2G
Receiving Date
I need to create a remote enabled function module in CRM system to fetch the u2018Batch Numberu2019 and u2018Received Quantityu2019 fields when the Material Number is fed to it.Please note that the input and output should be tables.
Could some one please give some sample source code for this.I used table types and select queries to resolve this problem.
-
Function module to hold and release lock on MARD table entry
Hi Gurus,
Can you please tell me Function module to HOLD lock on MARD table and the Function Module to release lock on MARD table entry.
Thanks and Regards,
SudiptoLook via SE11 lock objects, use F4 for tables MAR*, the best for your request is on MARC table with object EMMARCS, so use FM ENQUEUE_EMMARCS and DEQUEUE_EMMARCS.
Regards,
Raymond -
Function Module to get ABAP source code for a specific version
Hi all
Is there a function module that I can use to get the source code of another function module at a specific version?
For example, can I call a function module passing in "FM_NAME" and "FM_VERSION" and have it return the lines of code associated with that object?
Thanks in advance.
StuartThanks guys
That's incredibly helpful! I have one more question that I just thought of last night...
Is there a way to hook into the code activation process? I want to be able to take a snapshot of the ABAP source code at each point when it is activated for use in another system, but need to be able to intercept this event and get the source code at that point in time.
Any ideas?
Thanks! -
Modified Functional module not executing the inserted Code
Hi everyone
I've modified the IW_C_CREATE_TRANSPORT_REQUEST Functional module so that it calls the GUI_EXEC FM which calles my java script which saves the transport ID with a filename specified. The code seems to work when i test it within SAP, but when i come to use STARTRFC to call the function, the added code dosen't seem to be executing, the transport still gets created but my javascript is not being called?
Anyone know why?
Thanks - Peter
Code following
FUNCTION IW_C_CREATE_TRANSPORT_REQUEST.
""Local interface:
*" IMPORTING
*" VALUE(DESCRIPTION) LIKE E07T-AS4TEXT
*" VALUE(TRANSPORT_KIND) LIKE E070-TRFUNCTION DEFAULT 'K'
*" VALUE(LANGU) LIKE SY-LANGU DEFAULT 'EN'
*" VALUE(CQ_ID) LIKE E070-TRKORR DEFAULT 'FileName'
*" EXPORTING
*" VALUE(COMMFILE) LIKE E070-TRKORR
*" VALUE(PROG_PATH) LIKE E070-TRKORR
*" VALUE(CLASSNAME) LIKE E07T-AS4TEXT
*" EXCEPTIONS
*" LANGUAGE_MISSING
*" NUMBER_RANGE_FULL
*" UNALLOWED_TRFUNCTION
*" NO_AUTHORIZATION
*" CREATE_TRANSPORT_ERROR
CLEAR COMMFILE.
CASE TRANSPORT_KIND.
WHEN 'P'.
Stücklisten für Releasewechsel
IF NOT LANGU IS INITIAL.
PERFORM CREATE_RELEASE_REQUEST
USING LANGU
DESCRIPTION
TRANSPORT_KIND
CHANGING COMMFILE.
ELSE.
keine Sprache angegeben und Transportart Stücklisten
RAISE LANGUAGE_MISSING.
ENDIF.
WHEN OTHERS.
Alle anderen Transporte
PERFORM CREATE_REQUEST
USING DESCRIPTION
TRANSPORT_KIND
CHANGING COMMFILE.
ENDCASE.
*{ INSERT SM1K900042 1
WRITE 'Entering My Pogram'.
PROG_PATH = 'java.exe'.
CLASSNAME = '-cp c: writeToFile'.
CONDENSE CLASSNAME.
CONDENSE PROG_PATH.
CONCATENATE CLASSNAME CQ_ID COMMFILE INTO CLASSNAME SEPARATED BY ' '.
CALL FUNCTION 'GUI_EXEC'
EXPORTING
PARAMETER = CLASSNAME
COMMAND = PROG_PATH.
WRITE 'Our path is'.
WRITE PROG_PATH.
WRITE CLASSNAME.
*} INSERT
ENDFUNCTION.
*************************FORMS****************************************
FORM CREATE_RELEASE_REQUEST *
Transportauftrag für Stücklisten erstellen *
FORM CREATE_RELEASE_REQUEST
USING P_LANGU LIKE SY-LANGU
P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT
P_TRANS_KIND LIKE E070-TRFUNCTION
CHANGING P_COMMFILE LIKE E070-TRKORR.
DATA: SUBRC LIKE SY-SUBRC,
H_TMP_LANG(2) TYPE C,
H_NUMBER(3) TYPE C,
NUMBER(4) TYPE C.
Anwednungslog öffnen
PERFORM OPEN_LOG
USING P_TRANSPORT_DESCRIPT.
*Nummer ziehen
PERFORM GET_NUMBER USING P_LANGU
CHANGING H_NUMBER
SUBRC.
IF SUBRC = 12.
Fehler beim erstellen des Transportauftrags
RAISE CREATE_TRANSPORT_ERROR.
ELSEIF SUBRC = 11.
Nummernkreis voll
RAISE NUMBER_RANGE_FULL.
ELSE.
WRITE P_LANGU TO H_TMP_LANG.
P_COMMFILE = 'SAPKXXXLYY'.
REPLACE 'XXX' WITH H_NUMBER INTO P_COMMFILE.
REPLACE 'YY' WITH H_TMP_LANG INTO P_COMMFILE.
CALL FUNCTION 'SUBST_CREATE_COMMANDFILE'
EXPORTING
IV_KORRNAME = P_COMMFILE
IV_KORRTYPE = P_TRANS_KIND
IV_KORRTEXT = P_TRANSPORT_DESCRIPT
EXCEPTIONS
NAME_COLLISION = 1
CREATE_HEADER_FAILED = 2
UPDATE_HEADER_FAILED = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
CLEAR P_COMMFILE.
Fehler beim Erstellen des Transportauftrags
RAISE CREATE_TRANSPORT_ERROR.
ELSE.
Transportauftrag erstellt
Log schreiben
PERFORM WRITE_LOGFILE
USING P_COMMFILE.
ENDIF.
ENDIF.
ENDFORM. "CREATE_RELEASE_REQUEST
FORM CREATE_REQUEST *
Transportauftrag erstellen *
FORM CREATE_REQUEST
USING P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT
P_TRANS_KIND LIKE E070-TRFUNCTION
CHANGING P_COMMFILE LIKE E070-TRKORR.
CALL FUNCTION 'TRINT_INSERT_NEW_COMM'
EXPORTING
WI_KURZTEXT = P_TRANSPORT_DESCRIPT
WI_TRFUNCTION = P_TRANS_KIND
IMPORTING
WE_TRKORR = P_COMMFILE
EXCEPTIONS
NUMBER_RANGE_FULL = 1
INVALID_INPUT = 2
NO_AUTHORIZATION = 3
OTHERS = 4.
CASE SY-SUBRC.
WHEN 0.
Auftrag erstellt
Anwednungslog öffnen
PERFORM OPEN_LOG
USING P_TRANSPORT_DESCRIPT.
Log schreiben
PERFORM WRITE_LOGFILE
USING P_COMMFILE.
WHEN 1. "Nummernkreis für Aufträge voll
CLEAR P_COMMFILE.
RAISE NUMBER_RANGE_FULL.
p_error_msg-no = '735'.
WHEN 2. "Unbekannter Auftragstyp
CLEAR P_COMMFILE.
RAISE UNALLOWED_TRFUNCTION.
p_error_msg-no = '353'.
WHEN 3. "keine Berechtigung
CLEAR P_COMMFILE.
RAISE NO_AUTHORIZATION.
p_error_msg-no = '328'.
WHEN 4. "Allgemeiner Fehler
CLEAR P_COMMFILE.
RAISE CREATE_TRANSPORT_ERROR.
p_error_msg-no = '353'.
ENDCASE.
ENDFORM. "create_request
FORM OPEN_LOG *
Anwedungslog öffnen *
FORM OPEN_LOG
USING P_TRANSPORT_DESCRIPT LIKE E07T-AS4TEXT.
*init application log
PERFORM LOG_INIT USING C_APPL_LOG_TRANSPORT.
*log header
PERFORM LOG_HEADER
USING C_APPL_LOG_TRANSPORT P_TRANSPORT_DESCRIPT.
ENDFORM. "OPEN_LOG
FORM WRITE_LOGFILE *
Logfile in den Anwendungslog schreiben *
-> P_TRANSPORT_DESCRIPT *
FORM WRITE_LOGFILE
USING P_COMMFILE LIKE E070-TRKORR.
DATA: H_ERROR_MSG LIKE IWERRORMSG.
*log message transport created
CLEAR H_ERROR_MSG.
MOVE '42' TO H_ERROR_MSG-ID.
MOVE 'I' TO H_ERROR_MSG-TYPE.
MOVE '733' TO H_ERROR_MSG-NO.
MOVE P_COMMFILE TO H_ERROR_MSG-V1.
PERFORM LOG_MSG
USING C_APPL_LOG_TRANSPORT '2' H_ERROR_MSG.
*log save
PERFORM LOG_SAVE
USING C_APPL_LOG_TRANSPORT.
ENDFORM. "WRITE_LOGFILE
FORM GET_NUMBER *
--> LANGU *
--> NUMBER *
FORM GET_NUMBER
USING LANGU LIKE SY-LANGU
CHANGING NUMBER TYPE C
SUBRC LIKE SY-SUBRC.
CONSTANTS: OBJECT LIKE INRI-OBJECT VALUE 'SIWBTRANSP'.
DATA: NR_RANGE LIKE INRI-NRRANGENR,
RETURNCODE LIKE INRI-RETURNCODE,
ERROR_MSG LIKE IWERRORMSG.
CLEAR SUBRC.
NR_RANGE = '01'.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = NR_RANGE
OBJECT = OBJECT
SUBOBJECT = LANGU
IMPORTING
NUMBER = NUMBER
RETURNCODE = RETURNCODE
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
OTHERS = 7.
CASE SY-SUBRC.
WHEN 00.
WHEN 01.
PERFORM NUMBER_RANGE_INTERVAL_INSERT
USING NR_RANGE LANGU
CHANGING NUMBER
RETURNCODE.
WHEN OTHERS.
SUBRC = 12.
PERFORM FILL_ERROR_MSG
USING C_MESSAGE_ERROR 736 SY-SUBRC SPACE SPACE SPACE
CHANGING ERROR_MSG.
PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 1 ERROR_MSG.
ENDCASE.
CASE RETURNCODE.
WHEN ' '.
WHEN '1'. "Nummer im kritischen Bereich
PERFORM FILL_ERROR_MSG
USING C_MESSAGE_INFO 734 SPACE SPACE SPACE SPACE
CHANGING ERROR_MSG.
PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 2 ERROR_MSG.
WHEN '2'. "letzte Nummer vergeben
PERFORM FILL_ERROR_MSG
USING C_MESSAGE_INFO 735 SPACE SPACE SPACE SPACE
CHANGING ERROR_MSG.
PERFORM LOG_MSG USING C_APPL_LOG_TRANSPORT 1 ERROR_MSG.
SUBRC = 11.
ENDCASE.
ENDFORM. "number_get
Message was edited by:
Peter LaiHi i've tried restarting and starting the server, but it didn't help, would it have anything to do with the fact i'm callin sap which is calling JAVA from a .exe program. The .exe program is having problems connecting to the JAVA program as there is no link?
I did a trace as well and this is what it came up with:
Error in program 'startrfc': ======> Exception condition "NO_BATCH" raised.
>>>> [1] <unknown> : EXT <ac: 7> L DDSLOCTE01 >>> CLOSE abrfcrcv.c 429 (23850562)
-{F0776FA3-F1A7-4662-BF7A-D1352735C394}
*> RfcReceive
handle = 1
Data conversion On
Error in program 'startrfc': <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
Error in program 'startrfc': <* RfcCallReceive [1] : returns 3:RFC_SYS_EXCEPTION
>>>> [1] <unknown> : EXT <ac: 8> L DDSLOCTE01 >>> FREE abrfcio.c 3517 (23850562)
-{F0776FA3-F1A7-4662-BF7A-D1352735C394}
Trace file opened at 20070312 164006 GMT Standard T, SAP-REL 640,0,119 RFC-VER 3 818122 MT-SL
*> RfcClose called by external program ...
handle = 1
*> rfcClose called by RFC-Library in file: abrfc.c, line: 532
handle = 1
Trace file opened at 20070312 164006 GMT Standard T, SAP-REL 640,0,119 RFC-VER 3 818122 MT-SL
<* rfcClose
>* RfcClose
Any help or ideas what it could be would be great -
Function Module to get TR released to PC4
Hi all,
I need a Function module to read the TR that are released to Quality systems and Production systems.
I will pass a table of TR as input parameter to the function module. And the function module should return a table of values containing those TR from the input passed that were imported into Production system or Quality systems.
If possible please describe the function module with their usage.
Best Regards,
SureshHi,
Check these function modules... if any of them is helpful to you...
SL_RFC_TRINT_CHECK_TRANSP_DISP
SL_RFC_TRINT_READ_WBOCONFIG
SCTM_GET_OPEN_TRANSPORTS_RFC
SLW_TRAN2_COPY_ASSIGNMENT_RFC
SLW_TRAN2_DEVC_LANG_GET_L_RFC
SLW_TRAN2_DEVC_LANG_GET_RFC
TR_OBJECTS_OF_REQ_AN_TASKS_RFC
TR_RFC_READ_PROJECT
Regards
Siddarth -
Request having function group released but function module attribute shows not released
Hi experts,
I am a beginner.
There is a transport request in which my function group and other objects were present . This transport request and its task were released . But if i check the attributes section of the function module that is present in that function group , it shows not released .
Is there some problem ? did the function module not get released with its group? It wasn't showing anywhere in the request even though i had added it during creation.
Here is the image :
Thanks,
UnnatiHi,
Those two meanings of 'released' are unrelated. Don't worry about it.
Also, a function module sometimes does not explicitly appear in a transport request, if the function group is already in there.
cheers
Paul -
Direct Delivery Sales Order - Function Module for Purchase Requisition
Hello Experts,
When we creat a Direct Delivery Sales Order at Production Plant then one Direct Delivery Purchase Requisition automatically gets generated at the Distribution Warehouse. If anyone knows the function module which actually generates this Direct Delivery PReq, then request him/her to please let us know.
Thanks and Regards
JosephHi,
Whatever Function Module's given are for or above 4.6C versions.
I want for 4.6B version.
At the same time, the returned tables should return more than 1 Pur.Req number as the FM's mentioned returns only 1.
Thanks,
Mich -
BAPI Function Module for SCM APO Trans code /SAPAPO/AC42
Hi,
Is there any BAPI Function Modules for SCM APO Tcode /SAPAPO/AC42.
This BAPI FM should return the column values "Remaining Prod Alloc" and "Incoming Order Quantity" when we give
below details as inputs for the Tcode /SAPAPO/AC42
Product Allocation Group
Product
Allocation Procedure
prod Alloc step
Product Alloc Object (Characteristics of Product Alloc Group)
Plant (Characteristics of Product Alloc Group)
Customer Group 5 (Characteristics of Product Alloc Group)
Reward points if helpful.
Thanks,
MichHi,
You should be able to get the information using the standard BAPI (Assuming you are using SCM5.0) BAPI_APOPAL_INSERT in the transaction BAPI.
ProductAllocationAPO.DataInsert
Interface to Import Product Allocation Data Functionality
This method is used to adopt data from OLTP systems for product allocation in the global availability check.
You can do the following using the method:
Adopt new data
You can adopt new characteristics combinations or new time series. Newly created characteristics combinations have the status Active and are therefore included in the product allocation check.
Change existing data
You can overwrite existing data if you have set the interface parameter ALLOW_UPDATE. You can set the status of existing characteristics combinations to Active if you set the interface parameter UPDATE_STATUS. If the characteristics combination does not exist, the system creates it.
The product allocation quantity is overwritten for existing time series. If you also want to change the incoming orders quantity, you must set the interface parameter UPDATE_INCOMING_ORDER_QTY. If the time series does not exist, the system creates it.
Prerequisite
To be able to use this method, you must have made all the Customizing settings for product allocation. For more information, see the Implementation Guide (IMG) for SAP APO under Global Available-to-Promise -> Product Allocation.
Regards
Vinod -
Function module to change the reason code for status in a Opportunuity/lead
Hi,
What is the function module to change the opportunity reason. I was able to change the status using the crm_order_maintain but How can I change the reason for that opportunity.
Thanks
naveenYou can use CRM_ORDER_MAINTAIN and populate the parameter IT_SERVICE_OS
or use BAPI_OPPORTUNITY_CHANGEMULTI and populate the parameter SERVICE_OS.
BR,
Florin -
Purchase requisition Release code
Hi,
Is there any DB table to find out which release code has been released for a PR line item.CHECK FOLLOWING FIELDS IN EBAN:
FRGKZ
FRGZU
FRGST
FRGDT
FRGGR
FRGRL
GSFRG
RLWRT
THESE ARE RELATED WITH RELEASE...
Maybe you are looking for
-
How to update my homepage, using a different computer
I have published a set of pages on Idisk from my home computer, using Iweb. Now on my vacation I would like to add a couple of pictures to my homepage using my powerbook instead. I therefore downloaded my current homepages from idisk but I can not co
-
Can i change my old ipod to the new one with priceless
I have an ipod, they said ipod touch 3 8gb, they said... Now i can't do anything with this because too many apps require IOS >4.2.1 So i have a question: Can i change my old ipod to the new one with priceless. Thanks for reading p/s: im living in San
-
Seeing lots of good reports of LP9 being much nicer on the CPU, do you think running it on a Mac Mini is more viable now? Obviously 7200RPM drive and 4MB ram but if only running 8-12 simultaneous tracks think it should preform well?
-
Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.
-
hi all, After updating and saving Code groups and Codes using QS41, codes are not displayed when we try to view the codes using QS41. But the codes are displyed when we try to access through Notification. Is there some setting to be done for this Thn