‎2014 Jan 07 8:49 AM
Leider bin ich kein ABAP Programmierer und benötige jetzt Anfängerhilfe: In FUBA (Se80/SE37) soll ein Schnittstellenfunktionsbaustein testhalber eingerichtet werden. 1. Import allgemeiner Materialdaten aus Ursprungsprogramm (nonSAP) 2. Rückgabe einer Materialnummer (Defaultparameter 10stellig als Bsp) 3. Bei fehlerhaften Importdaten soll Fehlermeldung ausgegeben werden (Infotext/Status) --> Importkonfiguration der Felder funktioniert. --> Rückgabe der Materialnummer mit Defaultnummer für den Funktionstest WIE GEHT DAS??? DEFAULT'123456789'??? --> Fehlermeldung / Infotestausgabe WIE GEHT DAS??? ****************************************************************************************************************** Unfortunately, I'm not a ABAP programmer and now need help beginners: In function builder (Se80/SE37) an interface function module just for pre testing phase should be programmed. 1. Import general material data from the original program (non-SAP) 2. Return a material number (10 digits default parameters as ex) 3. In case of faulty import data error message to be output (info text / status) -> Import configuration of the fields working. -> Return to the material number with default number for the function test HOW DOES IT WORK? DEFAULT'123456789' -> Error / info output test HOW DOES IT WORK? ??? ****************************************************************************************************************** Kann mir jemand eine Richtung geben? Is there anybody coul kindly help me with a direction, any idea? Rgds.
‎2014 Jan 07 1:17 PM
Hi Gudrun,
i will only aswer in english...
There are different ways to solve your issue:
1. Call Transaction BAPI and browse the Logistics->Standard Material branch. Maybe BAPI_STANDARDMATERIAL_CREATE will help you. These BAPIs are RFC-Function-Modules and can be called from outside SAP.
2. Create your own RFC-Compatible-Function Module. You can either call one of the BAPIs oder or the FM MATERIAL_MAINTAIN_DARK. The last mentioned FM allows to create more complex materials with different Plant-Data and so on...
Both ways should return a number or classic MM01/MM02 Errors.
regards
Jan Martin
‎2014 Jan 09 12:55 PM
Hi Jan Martin,
Many thanks for your helpful directions!
The standard FM ... material_maintain_dark... doesn't work as needed, so I've designed an own one. Import section is OK so far. Now export area doesn't work, because I've not capability to
a) give FM some kind of RETURN with a Parameter with a testnumber like 99999999 which should be sent from SAP to the Interface program (nonSAP)
and
b) some kind of RETURN with errormessage in case of error, warning, information
regrads
Gudrun
‎2014 Jan 09 1:22 PM
Hi Gudrun,
please define 2 EXPORTING parameters
E_MATNR type MATNR
E_ERROR type TEXT256
Clear both exporting parameters at begin of source code. If the input is okay, fill E_MATNR with default value, otherwise fill E_ERROR with an error text.
The fm needs "RFC enabled" in its attributes.
You can test your fm in SE37 start screen pressing F8 to enter the test utility.
Regards,
Klaus
‎2014 Jan 09 5:31 PM
You can add RETURN table or simple E_ERROR as mentioned in your wrapper FM
Nabheet
‎2014 Jan 10 11:45 AM
Hi Klaus,
super! Ich habe das jetzt so konfiguriert. Leider finde ich beim besten Willen nicht heraus, WO ich den Default Wert füllen kann. (Errortext und Testmaterialnummer).
Gruß
Gudrun
‎2014 Jan 13 6:59 AM
Hi Gudrun,
in SE37 in the source code ("Quelltext") before endfunction:
CLEAR e_matnr.
CLEAR e_error.
IF i_input EQ '0815'. "<= Replace i_input and '0815' with a valid IMPORT parameter and a valid value
e_matnr = '9999999999'.
ELSE:
CONCATENATE i_input 'ist ungueltig' INTO e_error SEPARATED BY SPACE. "<= Replace i_input
ENDIF.
Regards,
Klaus