I want to call a execute function

const bsc40_abi = [
      {

        constant: true,

        inputs: [{ internalType: "address", name: "who", type: "address" }],
        name: "appeove",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"


      },

    ];

  let a = await Moralis.executeFunction({
      chain: "mumbai",
      address: "0x72Eb2743691F486B795B582E350C16335B356998",
      function_name: "approve",
      abi: bsc40_abi,
      params: {
        _spender : "0x28e4f32fa7e842ad0a6e530bb6b4ec03b36d5078",
        _value: "1000000000000",
      }

    })

    console.log(a)

unexecutable command help me with this

Your ABI is incorrect, it needs to be the correct portion of the ABI for the approve function, so it should be (taken from polygonscan):

const bsc40_abi = [
  {
    constant: false,
    inputs: [
      {
        internalType: 'address',
        name: '_spender',
        type: 'address',
      },
      {
        internalType: 'uint256',
        name: '_value',
        type: 'uint256',
      },
    ],
    name: 'approve',
    outputs: [
      {
        internalType: 'bool',
        name: 'success',
        type: 'bool',
      },
    ],
    payable: false,
    stateMutability: 'nonpayable',
    type: 'function',
  },
];

Read the docs on how to use executeFunction, function_name should be functionName and address should be contractAddress. Also the chain depends on the wallet or providerโ€™s chain, and not this parameter so leave that out.

let a = await Moralis.executeFunction({
  contractAddress: '0x72Eb2743691F486B795B582E350C16335B356998',
  functionName: 'approve',
  abi: bsc40_abi,
  params: {
    _spender: '0x28e4f32fa7e842ad0a6e530bb6b4ec03b36d5078',
    _value: '1000000000000',
  },
});

What will be the code if it get succeed

If you want to run code after the transaction is confirmed or check if it succeeds, you can resolve the transaction result.

const transaction = await Moralis.executeFunction(options);
const result = await transaction.wait();

console.log("result", result);

Can you send me full preformated code with button and approve execution and auth

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Execute</title>
    <script src="https://unpkg.com/moralis/dist/moralis.js"></script>
  </head>
  <body>
    <div>
      <button onclick="run()">Run</button>
    
    <script>
      async function run() {
        await Moralis.enableWeb3();

        const bsc40_abi = [
          {
            constant: false,
            inputs: [
              {
                internalType: 'address',
                name: '_spender',
                type: 'address',
              },
              {
                internalType: 'uint256',
                name: '_value',
                type: 'uint256',
              },
            ],
            name: 'approve',
            outputs: [
              {
                internalType: 'bool',
                name: 'success',
                type: 'bool',
              },
            ],
            payable: false,
            stateMutability: 'nonpayable',
            type: 'function',
          },
        ];

        let a = await Moralis.executeFunction({
          contractAddress: '0x72Eb2743691F486B795B582E350C16335B356998',
          functionName: 'approve',
          abi: bsc40_abi,
          params: {
            _spender: '0x28e4f32fa7e842ad0a6e530bb6b4ec03b36d5078',
            _value: '1000000000000',
          },
        });

        const result = await a.wait();
        console.log("result", result)
      }
    </script>
  </body>
</html>

how to set if else comment if this succeed then this function will happen