Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Unable to update a record using PAI, in Module pool

HI,

I am unable to update the records in to the z-table using PAI, module pool. Could any one help me please.,

the prg is as folows:

INCLUDE MZFIRSTPAGETOP . " global Data

TABLES: ZCHP_CUST_INFO.

DATA: OKCODE LIKE SY-UCOMM.

DATA: CNAME LIKE ZCHP_CUST_INFO-CREATED_BY,

REQTYP LIKE ZCHP_CUST_INFO-REQUEST_TYPE,

DESC LIKE ZCHP_CUST_INFO-SHORT_TEXT,

PRIO_TYPE LIKE ZCHP_CUST_INFO-PRIORITY_TYPE,

EFFECTIVE_DATE like ZCHP_CUST_INFO-REQUIRED_STR_DAT,

COMM_TYP like ZCHP_CUST_INFO-MODE_OF_COMM,

COMM like ZCHP_CUST_INFO-ADDRESS.

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE STATUS_0100 OUTPUT.

SET PF-STATUS 'FOR1000'.

SET TITLEBAR '1000'.

ENDMODULE. " STATUS_0100 OUTPUT

  • INCLUDE MZFIRSTPAGEO01 . " PBO-Modules *

  • INCLUDE MZFIRSTPAGEI01 . " PAI-Modules *

  • INCLUDE MZFIRSTPAGEF01 . " FORM-Routines *

&----


*& Module USER_COMMAND_1000 INPUT

&----


  • text

----


MODULE USER_COMMAND_1000 INPUT.

CASE SY-UCOMM.

WHEN 'SUBMIT'.

  • Updating the record.

ZCHP_CUST_INFO-CREATED_BY = CNAME.

ZCHP_CUST_INFO-REQUEST_TYPE = REQTYP.

ZCHP_CUST_INFO-PRIORITY_TYPE = PRIO_TYPE.

ZCHP_CUST_INFO-SHORT_TEXT = DESC.

ZCHP_CUST_INFO-CREATED_ON = EFFECTIVE_DATE.

ZCHP_CUST_INFO-MODE_OF_COMM = COMM_TYP.

ZCHP_CUST_INFO-ADDRESS = COMM.

*ENDIF.

INSERT ZCHP_CUST_INFO.

COMMIT WORK.

WHEN 'RESET'.

CLEAR: CNAME,REQTYP,PRIO_TYPE,

DESC,EFFECTIVE_DATE,COMM_TYP,COMM.

WHEN 'CANCEL'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_1000 INPUT

Thanks in advance,

Sunil

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question